mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 20:59:29 +00:00
Revert "Enhance Parser when dealing with leading and trailing whitespaces"
This reverts commit 8cdcf90b
This commit is contained in:
parent
3f4441d0f5
commit
f3b33ef1d5
@ -86,8 +86,7 @@ class Parser(HTMLParser):
|
||||
|
||||
for entities in self.tag_entities.values():
|
||||
for entity in entities:
|
||||
entity.offset += len(data) - len(data.lstrip()) # Ignore left whitespaces for offsets
|
||||
entity.length += len(data.strip()) # Ignore all whitespaces (left + right) for lengths
|
||||
entity.length += len(data)
|
||||
|
||||
self.text += data
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user