Fix duplicate unicode formatting when mixing strikethrough and underline
This commit is contained in:
@@ -161,11 +161,12 @@ class MatrixParser(HTMLParser):
|
|||||||
elif previous_tag == "command":
|
elif previous_tag == "command":
|
||||||
text = f"/{text}"
|
text = f"/{text}"
|
||||||
|
|
||||||
# Strikethrough
|
strikethrough, underline = "del" in self._open_tags, "u" in self._open_tags
|
||||||
if "del" in self._open_tags:
|
if strikethrough and underline:
|
||||||
|
text = html_to_unicode(text, "\u0336\u0332")
|
||||||
|
elif strikethrough:
|
||||||
text = html_to_unicode(text, "\u0336")
|
text = html_to_unicode(text, "\u0336")
|
||||||
# Underline
|
elif underline:
|
||||||
if "u" in self._open_tags:
|
|
||||||
text = html_to_unicode(text, "\u0332")
|
text = html_to_unicode(text, "\u0332")
|
||||||
|
|
||||||
list_entry_handled_once = False
|
list_entry_handled_once = False
|
||||||
|
|||||||
Reference in New Issue
Block a user