Add underline support

This commit is contained in:
夜坂雅 2022-09-12 19:40:36 +08:00
parent 1e49b278c4
commit 2b438ddbb0
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,8 @@ class MatrixHTMLParser(HTMLParser):
self.buffer += "<b>"
elif tag in ("s", "del"):
self.buffer += "<s>"
elif tag == "u":
self.buffer += "<u>"
elif tag == "blockquote":
if not self.buffer.endswith("\n"):
self.buffer += "\n"
@ -65,6 +67,8 @@ class MatrixHTMLParser(HTMLParser):
self.buffer += "</b>"
elif tag in ("s", "del"):
self.buffer += "</s>"
elif tag == "u":
self.buffer += "</u>"
if tag == "mx-reply" and self.strip_reply:
self.is_in_reply = False