From: Jason Woofenden Date: Mon, 1 Feb 2016 22:49:22 +0000 (-0500) Subject: parser fix: set .parent on text nodes X-Git-Url: https://jasonwoof.com/gitweb/?p=peach-html5-editor.git;a=commitdiff_plain;h=1b122e1b7a9a295a994ce399b84f3db7f682e470 parser fix: set .parent on text nodes --- diff --git a/parser.coffee b/parser.coffee index aa7233e..7992244 100644 --- a/parser.coffee +++ b/parser.coffee @@ -1246,6 +1246,7 @@ parse_html = (args_html, args = {}) -> prev.text += t.text return dest[0].children.splice dest[1], 0, t + t.parent = dest[0] return # 8.2.5 http://www.w3.org/TR/html5/syntax.html#tree-construction