Make HTML parser yield the correct offset and lengths

This commit is contained in:
Lonami Exo 2018-11-19 09:20:13 +01:00
parent d6ec883cd9
commit d854babf22

View File

@ -98,7 +98,7 @@ class HTMLToTelegramParser(HTMLParser):
text = url
for tag, entity in self._building_entities.items():
entity.length += len(text.strip('\n'))
entity.length += len(text)
self.text += text