chiark
/
gitweb
/
~ian
/
mastodonochrome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84fd087
)
HTML formatting: support <i>.
author
Simon Tatham
<anakin@pobox.com>
Thu, 14 Dec 2023 18:20:24 +0000
(18:20 +0000)
committer
Simon Tatham
<anakin@pobox.com>
Thu, 14 Dec 2023 18:20:24 +0000
(18:20 +0000)
Same as <em>, of course.
text.py
patch
|
blob
|
history
diff --git
a/text.py
b/text.py
index 378b5fcc0630129380e02b5488accbd2b60cb0ad..233c0f06469923d3197fe662685096067606a723 100644
(file)
--- 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