Skip to content

Commit b2d04d4

Browse files
committed
fix an EOF bug in the tokenizer and add a testcase to make sure we don't regress in the future on that; also add a weird attribute testcase
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40266
1 parent 4d7de25 commit b2d04d4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tokenizer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def emitCurrentToken(self):
375375
# Add token to the queue to be yielded
376376
self.tokenQueue.append(token)
377377

378-
self.changeState('data')
378+
self.changeState("data")
379379

380380
def emitToken(self, token):
381381
""" Used to add tokens directly to the queue to be yeilded
@@ -586,6 +586,7 @@ def attributeNameState(self):
586586
self.changeState("beforeAttributeName")
587587
elif data == u"<" or data == EOF:
588588
self.emitCurrentTokenWithParseError(data)
589+
leavingThisState = False
589590
else:
590591
self.currentToken.data[-1][0] += data
591592
leavingThisState = False

0 commit comments

Comments
 (0)