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 f7cab6f commit 7d69da2Copy full SHA for 7d69da2
html5lib/_ihatexml.py
@@ -104,16 +104,16 @@ def charStringToList(chars):
104
charRanges = [item.strip() for item in chars.split(" | ")]
105
rv = []
106
for item in charRanges:
107
- foundMatch = False
+
108
for regexp in (reChar, reCharRange):
109
match = regexp.match(item)
110
if match is not None:
111
rv.append([hexToInt(item) for item in match.groups()])
112
if len(rv[-1]) == 1:
113
rv[-1] = rv[-1] * 2
114
- foundMatch = True
115
break
116
- if not foundMatch:
+ else:
117
assert len(item) == 1
118
119
rv.append([ord(item)] * 2)
0 commit comments