Fix missing tail for inline <mx-reply>

This commit is contained in:
miruka 2021-04-15 16:22:44 -04:00
parent 7a33ecdb86
commit 3279a1befd

View File

@ -487,12 +487,14 @@ class HTMLProcessor:
try: try:
user_id = el.find("blockquote").findall("a")[1].text user_id = el.find("blockquote").findall("a")[1].text
text = f"{user_id[1:].split(':')[0]}: " # U+21A9 arrow text = f"{user_id[1: ].split(':')[0]}: " # U+21A9 arrow
except (AttributeError, IndexError) as e: tail = el.tail.rstrip().rstrip("")
except (AttributeError, IndexError):
return el return el
el.clear() el.clear()
el.text = text el.text = text
el.tail = tail
return el return el