From: Simon Tatham Date: Thu, 14 Dec 2023 18:20:24 +0000 (+0000) Subject: HTML formatting: support . X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=8d1793fcb442befbf985f45a6693f95994c6489f;p=mastodonochrome.git HTML formatting: support . Same as , of course. --- diff --git a/text.py b/text.py index 378b5fc..233c0f0 100644 --- a/text.py +++ b/text.py @@ -493,7 +493,7 @@ class HTMLParser(html.parser.HTMLParser): self.colourstack.append('s') return - if tag == "em": + if tag in {"em", "i"}: self.colourstack.append('_') return @@ -513,7 +513,7 @@ class HTMLParser(html.parser.HTMLParser): self.paras.append(Paragraph()) return - if tag in {"a", "code", "strong", "em"}: + if tag in {"a", "code", "strong", "em", "i"}: self.colourstack.pop() return