Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
peach-html5-editor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6c4bd69
)
fix <html> at start
author
Jason Woofenden
<jason@jasonwoof.com>
Tue, 22 Dec 2015 17:18:51 +0000
(12:18 -0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Tue, 22 Dec 2015 17:18:51 +0000
(12:18 -0500)
parse-html.coffee
patch
|
blob
|
history
diff --git
a/parse-html.coffee
b/parse-html.coffee
index
85a91af
..
e193118
100644
(file)
--- 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
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
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
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
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
# 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
afe = [] # active formatting elements
template_insertion_modes = []
insertion_mode = ins_mode_initial