Skip to content

Commit 3c5b658

Browse files
committed
Whoops, last commit broke some tests - fixed now
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401243
1 parent f000f56 commit 3c5b658

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/html5lib/inputstream.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,10 @@ def charsUntil(self, characters, opposite = False):
343343
# Find the longest matching prefix
344344
m = chars.match(self.chunk, self.chunkOffset)
345345
if m is None:
346-
break
346+
end = self.chunkOffset
347+
else:
348+
end = m.end()
347349
# If not everything matched, return everything up to the part that didn't match
348-
end = m.end()
349350
if end != self.chunkSize:
350351
rv.append(self.chunk[self.chunkOffset:end])
351352
self.chunkOffset = end

0 commit comments

Comments
 (0)