Fix inline >quote regex for quotes after a <tag>

Example, if a room list item subtitle was ">a \n >b", only ">a" was
wrapped with the "quote" class and colored appropriatly due to <a> being
wrapped in a <span> and the regex failing on that
This commit is contained in:
miruka 2021-04-09 04:14:35 -04:00
parent 57a7b567ca
commit c4eef71a83

View File

@ -180,7 +180,7 @@ class HTMLProcessor:
r"https?://matrix.to/#/[!#]\S+/\$\S+", re.IGNORECASE,
)
inline_quote_regex = re.compile(r"(^|⏎)(\s*&gt;[^⏎\n]*)", re.MULTILINE)
inline_quote_regex = re.compile(r"(^|⏎|>)(\s*&gt;[^⏎\n]*)", re.MULTILINE)
quote_regex = re.compile(
r"(^|<span/?>|<p/?>|<br/?>|<h\d/?>)"