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:
0ad80cf
)
fix minor parsing bugs
author
Jason Woofenden
<jason@jasonwoof.com>
Thu, 24 Dec 2015 04:44:27 +0000
(23:44 -0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Thu, 24 Dec 2015 04:44:27 +0000
(23:44 -0500)
parse-html.coffee
patch
|
blob
|
history
diff --git
a/parse-html.coffee
b/parse-html.coffee
index
0fb97b9
..
b25359d
100644
(file)
--- a/
parse-html.coffee
+++ b/
parse-html.coffee
@@
-2726,7
+2726,8
@@
parse_html = (args) ->
ins_mode_in_body t
return
if t.type is TYPE_COMMENT
ins_mode_in_body t
return
if t.type is TYPE_COMMENT
- insert_comment t, [open_els[0], open_els[0].children.length]
+ first = open_els[open_els.length - 1]
+ insert_comment t, [first, first.children.length]
return
if t.type is TYPE_DOCTYPE
parse_error()
return
if t.type is TYPE_DOCTYPE
parse_error()
@@
-2805,7
+2806,7
@@
parse_html = (args) ->
ins_mode_in_body t
return
if t.type is TYPE_END_TAG and t.name is 'html'
ins_mode_in_body t
return
if t.type is TYPE_END_TAG and t.name is 'html'
- insert_mode = ins_mode_after_after_frameset
+ ins_mode = ins_mode_after_after_frameset
return
if t.type is TYPE_START_TAG and t.name is 'noframes'
ins_mode_in_head t
return
if t.type is TYPE_START_TAG and t.name is 'noframes'
ins_mode_in_head t
@@
-4514,7
+4515,7
@@
parse_html = (args) ->
txt = txt.replace(new RegExp("\r\n", 'g'), "\n") # fixfull spec doesn't say this
txt = txt.replace(new RegExp("\r", 'g'), "\n") # fixfull spec doesn't say this
txt = txt.replace(new RegExp("\r\n", 'g'), "\n") # fixfull spec doesn't say this
txt = txt.replace(new RegExp("\r", 'g'), "\n") # fixfull spec doesn't say this
- if args.name is "tests16.dat #25"
+ if args.name is "tests18.dat #17"
console.log "hi"
# proccess input
# http://www.w3.org/TR/html5/syntax.html#tree-construction
console.log "hi"
# proccess input
# http://www.w3.org/TR/html5/syntax.html#tree-construction