Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1b39377

Browse filesBrowse files
Use for:else: where it makes sense (html5lib#539)
Co-authored-by: zzj <29055749+zjzh@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
1 parent 4f9f5bf commit 1b39377
Copy full SHA for 1b39377

File tree

Expand file treeCollapse file tree

1 file changed

+1
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-4
lines changed

‎html5lib/_ihatexml.py

Copy file name to clipboardExpand all lines: html5lib/_ihatexml.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,15 @@ def charStringToList(chars):
104104
charRanges = [item.strip() for item in chars.split(" | ")]
105105
rv = []
106106
for item in charRanges:
107-
foundMatch = False
108107
for regexp in (reChar, reCharRange):
109108
match = regexp.match(item)
110109
if match is not None:
111110
rv.append([hexToInt(item) for item in match.groups()])
112111
if len(rv[-1]) == 1:
113112
rv[-1] = rv[-1] * 2
114-
foundMatch = True
115113
break
116-
if not foundMatch:
114+
else:
117115
assert len(item) == 1
118-
119116
rv.append([ord(item)] * 2)
120117
rv = normaliseCharList(rv)
121118
return rv

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.