JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fix is_mathml_text_integration_point()
[peach-html5-editor.git] / parse-html.coffee
index 255892f..8b30cf7 100644 (file)
@@ -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 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
@@ -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) ->
-       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?