Merge branch 'develop' into asyncio-dev
# Conflicts: # pyrogram/client/parser/html.py
This commit is contained in:
commit
c5af9cbc42
@ -111,10 +111,11 @@ class HTML:
|
|||||||
self.client = client
|
self.client = client
|
||||||
|
|
||||||
async def parse(self, text: str):
|
async def parse(self, text: str):
|
||||||
text = utils.add_surrogates(text)
|
# Strip whitespace characters from the end of the message, but preserve closing tags
|
||||||
|
text = re.sub(r"\s*(</[\w\W]*>)\s*$", r"\1", text)
|
||||||
|
|
||||||
parser = Parser(self.client)
|
parser = Parser(self.client)
|
||||||
parser.feed(text)
|
parser.feed(utils.add_surrogates(text))
|
||||||
parser.close()
|
parser.close()
|
||||||
|
|
||||||
if parser.tag_entities:
|
if parser.tag_entities:
|
||||||
|
Loading…
Reference in New Issue
Block a user