# File lib/html5/treebuilders/hpricot.rb, line 22 def appendChild(node) if node.kind_of?(TextNode) and childNodes.any? and childNodes.last.kind_of?(TextNode) childNodes.last.hpricot.content = childNodes.last.hpricot.content + node.hpricot.content else childNodes << node hpricot.children << node.hpricot end if (oldparent = node.hpricot.parent) != nil oldparent.children.delete_at(oldparent.children.index(node.hpricot)) end node.hpricot.parent = hpricot node.parent = self end