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

Commit8ae506e

Browse files
committed
Missing part of for etree treewalker to report the end tag of the root node
--HG--extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40993
1 parentaf96a74 commit8ae506e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

‎src/html5lib/treewalkers/etree.py‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,14 @@ def getNextSibling(self, node):
101101
returnNone
102102

103103
defgetParentNode(self,node):
104-
assertisinstance(node,tuple)
105-
elt,key,parents=node
106-
ifparents:
107-
elt,key=parents.pop()
108-
returnelt,key,parents
104+
ifisinstance(node,tuple):
105+
elt,key,parents=node
106+
ifparents:
107+
elt,key=parents.pop()
108+
returnelt,key,parents
109+
else:
110+
returnelt
109111
else:
110-
returnelt
112+
returnNone
111113

112114
returnlocals()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp