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 79f13b6 commit fdf984dCopy full SHA for fdf984d
xmltok/test.xml
@@ -9,5 +9,6 @@
9
baz
10
11
</u:GetConnectionTypeInfo>
12
+<!-- Comments, you won't see me after tokenize. -->
13
</s:Body>
14
</s:Envelope>
xmltok/xmltok.py
@@ -95,6 +95,14 @@ def tokenize(self):
95
yield from self.lex_attrs_till()
96
self.expect("?")
97
self.expect(">")
98
+ elif self.match("!"):
99
+ self.expect("-")
100
101
+ last3 = ''
102
+ while True:
103
+ last3 = last3[-2:] + self.getch()
104
+ if last3 == "-->":
105
+ break
106
else:
107
tag = self.getnsident()
108
yield (START_TAG, tag)
0 commit comments