From: Jason Woofenden Date: Tue, 22 Dec 2015 17:18:51 +0000 (-0500) Subject: fix at start X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=dc9926c4a5e1deaf3a5186edc15c2655ea99fb39;p=peach-html5-editor.git fix at start --- diff --git a/parse-html.coffee b/parse-html.coffee index 85a91af..e193118 100644 --- a/parse-html.coffee +++ b/parse-html.coffee @@ -1157,7 +1157,7 @@ parse_html = (txt, parse_error_cb = null) -> if is_space_tok t return if t.type is TYPE_COMMENT - # fixfull this is supposed to be "the last child of the document object" + # ?fixfull doc.children.push t return if t.type is TYPE_DOCTYPE @@ -1184,6 +1184,7 @@ parse_html = (txt, parse_error_cb = null) -> return if t.type is TYPE_START_TAG and t.name is 'html' el = token_to_element t, NS_HTML, doc + doc.children.push el open_els.unshift(el) # fixfull (big paragraph in spec about manifest, fragment, urls, etc) insertion_mode = ins_mode_before_head @@ -3364,7 +3365,7 @@ parse_html = (txt, parse_error_cb = null) -> # tree constructor initialization # see comments on TYPE_TAG/etc for the structure of this data doc = new Node TYPE_TAG, name: 'html', namespace: NS_HTML - open_els = [doc] + open_els = [] afe = [] # active formatting elements template_insertion_modes = [] insertion_mode = ins_mode_initial