We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b660115 commit 3eda82dCopy full SHA for 3eda82d
pyrogram/parser/html.py
@@ -117,7 +117,8 @@ def __init__(self, client: Optional["pyrogram.Client"]):
117
self.client = client
118
119
async def parse(self, text: str):
120
- # Strip whitespace characters from the end of the message, but preserve closing tags
+ # Strip whitespaces from the beginning and the end, but preserve closing tags
121
+ text = re.sub(r"^\s*(<[\w<>=\s\"]*>)\s*", r"\1", text)
122
text = re.sub(r"\s*(</[\w</>]*>)\s*$", r"\1", text)
123
124
parser = Parser(self.client)
0 commit comments