JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
parser fix: set .parent on text nodes
authorJason Woofenden <jason@jasonwoof.com>
Mon, 1 Feb 2016 22:49:22 +0000 (17:49 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Mon, 1 Feb 2016 22:49:22 +0000 (17:49 -0500)
parser.coffee

index aa7233e..7992244 100644 (file)
@@ -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