X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=parse-html.coffee;h=ed0070a83c77948b6182fb83fe4dcd07aabcc055;hb=d85e7aa0c19a662d9682b0fdf8992e69e0bb012e;hp=487fe9941a7eb2c69c1e42ec66929ec88d71102f;hpb=e0b4df676109a785258fa3bf09e38fc6ea3f4440;p=peach-html5-editor.git diff --git a/parse-html.coffee b/parse-html.coffee index 487fe99..ed0070a 100644 --- a/parse-html.coffee +++ b/parse-html.coffee @@ -2157,7 +2157,8 @@ parse_html = (args) -> return if t.type is TYPE_END_TAG and t.name is 'br' parse_error() - t.type = TYPE_START_TAG + # W3C: t.type = TYPE_START_TAG + t = new_open_tag 'br' # WHATWG # fall through if t.type is TYPE_START_TAG and (t.name is 'area' or t.name is 'br' or t.name is 'embed' or t.name is 'img' or t.name is 'keygen' or t.name is 'wbr') reconstruct_afe() @@ -3789,7 +3790,7 @@ parse_html = (args) -> return if c is '>' tok_state = tok_state_data - return + return tok_cur_tag if is_uc_alpha(c) tok_cur_tag.attrs_a.unshift [c.toLowerCase(), ''] tok_state = tok_state_attribute_name @@ -4685,7 +4686,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 - if args.name is "tests23.dat #1" + if args.name is "webkit01.dat #12" console.log "hi" # proccess input # http://www.w3.org/TR/html5/syntax.html#tree-construction