Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit37b0fcc

Browse files
committed
Stop treewalker escaping from subtree
1 parent53bf191 commit37b0fcc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/html5lib/treewalkers/_base.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,12 @@ def __iter__(self):
154154
namespace,name,attributes,hasChildren=details
155155
ifnamenotinvoidElements:
156156
yieldself.endTag(namespace,name)
157+
ifself.treeiscurrentNode:
158+
currentNode=None
159+
break
157160
nextSibling=self.getNextSibling(currentNode)
158161
ifnextSiblingisnotNone:
159162
currentNode=nextSibling
160163
break
161-
ifself.treeiscurrentNode:
162-
currentNode=None
163164
else:
164165
currentNode=self.getParentNode(currentNode)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp