10000
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 0db23a3 commit f1b28b0Copy full SHA for f1b28b0
html5lib/_inputstream.py
@@ -658,9 +658,7 @@ def matchBytes(self, bytes):
658
"""Look for a sequence of bytes at the start of a string. If the bytes
659
are found return True and advance the position to the byte after the
660
match. Otherwise return False and leave the position alone"""
661
- p = self.position
662
- data = self[p:p + len(bytes)]
663
- rv = data.startswith(bytes)
+ rv = self.startswith(bytes, self.position)
664
if rv:
665
self.position += len(bytes)
666
return rv
0 commit comments