8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10ce700 commit 4cb16faCopy full SHA for 4cb16fa
src/html5lib/tokenizer.py
@@ -333,9 +333,14 @@ def dataState(self):
333
# emitted separately.
334
self.tokenQueue.append({"type": "SpaceCharacters", "data":
335
data + self.stream.charsUntil(spaceCharacters, True)})
336
+ # No need to update lastFourChars here, since the first space will
337
+ # have already broken any <!-- or --> sequences
338
else:
339
+ chars = self.stream.charsUntil(("&", "<", ">", "-"))
340
self.tokenQueue.append({"type": "Characters", "data":
- data + self.stream.charsUntil(("&", "<", ">", "-"))})
341
+ data + chars})
342
+ self.lastFourChars += chars[-4:]
343
+ self.lastFourChars = self.lastFourChars[-4:]
344
return True
345
346
def entityDataState(self):
0 commit comments