From 8d1793fcb442befbf985f45a6693f95994c6489f Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 14 Dec 2023 18:20:24 +0000 Subject: [PATCH] HTML formatting: support . Same as , of course. --- text.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.30.2