mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-05 06:44:51 +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
1 changed files with 1 additions and 2 deletions
|
|
@ -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 a new issue