Skip to content

Commit 0d357fb

Browse files
committed
Improve HTML parser
Closes #567
1 parent 01a3aab commit 0d357fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyrogram/parser/html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def __init__(self, client: Optional["pyrogram.Client"]):
111111

112112
async def parse(self, text: str):
113113
# Strip whitespace characters from the end of the message, but preserve closing tags
114-
text = re.sub(r"\s*(</[\w\W]*>)\s*$", r"\1", text)
114+
text = re.sub(r"\s+(</[\w\W]*>)\s*$", r"\1", text)
115115

116116
parser = Parser(self.client)
117117
parser.feed(utils.add_surrogates(text))

0 commit comments

Comments
 (0)