mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-26 04:36:26 +01:00
Fix bug in cloneNode in lxml builder for html5lib parsing
This commit is contained in:
parent
3ab2f07a7d
commit
01f313af1f
1 changed files with 4 additions and 2 deletions
|
|
@ -83,7 +83,10 @@ def hasContent(self):
|
|||
removeChild = ElementBase.remove
|
||||
|
||||
def cloneNode(self):
|
||||
return self.makeelement(self.tag, nsmap=self.nsmap, attrib=self.attrib)
|
||||
ans = self.makeelement(self.tag, nsmap=self.nsmap, attrib=self.attrib)
|
||||
for x in ('name', 'namespace', 'nameTuple'):
|
||||
setattr(ans, x, getattr(self, x))
|
||||
return ans
|
||||
|
||||
def insertBefore(self, node, ref_node):
|
||||
self.insert(self.index(ref_node), node)
|
||||
|
|
@ -126,7 +129,6 @@ def reparentChildren(self, new_parent):
|
|||
for child in self:
|
||||
new_parent.append(child)
|
||||
|
||||
|
||||
class Comment(CommentBase):
|
||||
|
||||
@dynamic_property
|
||||
|
|
|
|||
Loading…
Reference in a new issue