From: Jason Woofenden Date: Wed, 23 Dec 2015 17:09:58 +0000 (-0500) Subject: fix tests: serialize namespaces X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=159b16dfd40020904dad07dd2643aaeb849187f4;p=peach-html5-editor.git fix tests: serialize namespaces --- diff --git a/parse-html.coffee b/parse-html.coffee index a6894cd..ca5a804 100644 --- a/parse-html.coffee +++ b/parse-html.coffee @@ -4257,3 +4257,6 @@ module.exports.TYPE_TAG = TYPE_TAG module.exports.TYPE_TEXT = TYPE_TEXT module.exports.TYPE_COMMENT = TYPE_COMMENT module.exports.TYPE_DOCTYPE = TYPE_DOCTYPE +module.exports.NS_HTML = NS_HTML +module.exports.NS_MATHML = NS_MATHML +module.exports.NS_SVG = NS_SVG diff --git a/test.coffee b/test.coffee index 9fe1293..274940b 100644 --- a/test.coffee +++ b/test.coffee @@ -7796,7 +7796,12 @@ serialize_els = (els, prefix = '| ') -> for el in els switch el.type when wheic.TYPE_TAG - ret += "#{prefix}<#{el.name}>\n" + ret += "#{prefix}<" + if el.namespace is wheic.NS_MATHML + ret += "math " + if el.namespace is wheic.NS_SVG + ret += "svg " + ret += "#{el.name}>\n" attr_keys = [] for k of el.attrs attr_keys.push k