We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1c6e6e commit 8cdcf90Copy full SHA for 8cdcf90
pyrogram/client/parser/html.py
@@ -86,7 +86,8 @@ def handle_data(self, data):
86
87
for entities in self.tag_entities.values():
88
for entity in entities:
89
- entity.length += len(data)
+ entity.offset += len(data) - len(data.lstrip()) # Ignore left whitespaces for offsets
90
+ entity.length += len(data.strip()) # Ignore all whitespaces (left + right) for lengths
91
92
self.text += data
93
0 commit comments