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

Commitc35d84c

Browse files
committed
Fix#217: Fully remove element in removeChild in etree treebuilder (#259)
This adds a test here because we still fail the upstream one, asour implementation of AAA is outdated.
1 parent2d37673 commitc35d84c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

‎html5lib/tests/test_parser2.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from .importsupport# noqa
88

99
fromhtml5lib.constantsimportnamespaces
10-
fromhtml5libimportparse,HTMLParser
10+
fromhtml5libimportparse,parseFragment,HTMLParser
1111

1212

1313
# tests that aren't autogenerated from text files
@@ -88,3 +88,8 @@ def test_debug_log():
8888
expected[i]=tuple(log)
8989

9090
assertparser.log==expected
91+
92+
93+
deftest_no_duplicate_clone():
94+
frag=parseFragment("<b><em><foo><foob><fooc><aside></b></em>")
95+
assertlen(frag)==2

‎html5lib/treebuilders/etree.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def insertBefore(self, node, refNode):
100100
node.parent=self
101101

102102
defremoveChild(self,node):
103+
self._childNodes.remove(node)
103104
self._element.remove(node._element)
104105
node.parent=None
105106

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp