Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
peach-html5-editor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix is_mathml_text_integration_point()
[peach-html5-editor.git]
/
parse-html.coffee
diff --git
a/parse-html.coffee
b/parse-html.coffee
index
d452803
..
8b30cf7
100644
(file)
--- a/
parse-html.coffee
+++ b/
parse-html.coffee
@@
-195,8
+195,8
@@
is_space_tok = (t) ->
return t.type is TYPE_TEXT && t.text.length is 1 and space_chars.indexOf(t.text) > -1
is_input_hidden_tok = (t) ->
return t.type is TYPE_TEXT && t.text.length is 1 and space_chars.indexOf(t.text) > -1
is_input_hidden_tok = (t) ->
- return unless t.type is TYPE_START_TAG
- for a of t.attrs_a
+ return false unless t.type is TYPE_START_TAG
+ for a in t.attrs_a
if a[0] is 'type'
if a[1].toLowerCase() is 'hidden'
return true
if a[0] is 'type'
if a[1].toLowerCase() is 'hidden'
return true
@@
-324,7
+324,7
@@
mathml_text_integration = {
mi: NS_MATHML, mo: NS_MATHML, mn: NS_MATHML, ms: NS_MATHML, mtext: NS_MATHML
}
is_mathml_text_integration_point = (el) ->
mi: NS_MATHML, mo: NS_MATHML, mn: NS_MATHML, ms: NS_MATHML, mtext: NS_MATHML
}
is_mathml_text_integration_point = (el) ->
- return mathml_text_integration[el.name] = el.namespace
+ return mathml_text_integration[el.name] is el.namespace
is_html_integration = (el) -> # DON'T PASS A TOKEN
if el.namespace is NS_MATHML and el.name is 'annotation-xml'
if el.attrs.encoding?
is_html_integration = (el) -> # DON'T PASS A TOKEN
if el.namespace is NS_MATHML and el.name is 'annotation-xml'
if el.attrs.encoding?
@@
-1395,6
+1395,7
@@
parse_html = (args) ->
el = insert_html_element t
head_element_pointer = el
ins_mode = ins_mode_in_head
el = insert_html_element t
head_element_pointer = el
ins_mode = ins_mode_in_head
+ return
if t.type is TYPE_END_TAG
if t.name is 'head' or t.name is 'body' or t.name is 'html' or t.name is 'br'
# fall through to Anything else below
if t.type is TYPE_END_TAG
if t.name is 'head' or t.name is 'body' or t.name is 'html' or t.name is 'br'
# fall through to Anything else below
@@
-3735,7
+3736,7
@@
parse_html = (args) ->
return
# Otherwise
parse_error()
return
# Otherwise
parse_error()
- tok_cur_tag = new_comment_token '!' # TODO test ("!" right?)
+ tok_cur_tag = new_comment_token ''
tok_state = tok_state_bogus_comment
return
tok_state = tok_state_bogus_comment
return
@@
-4413,6
+4414,8
@@
parse_html = (args) ->
# tokenizer initialization
tok_state = tok_state_data
# tokenizer initialization
tok_state = tok_state_data
+ if args.name is "one_that_breaks #1"
+ throw "hi" # console.log "hi"
# proccess input
# http://www.w3.org/TR/html5/syntax.html#tree-construction
while flag_parsing
# proccess input
# http://www.w3.org/TR/html5/syntax.html#tree-construction
while flag_parsing