www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 49bdd1e9fa1616355fb97870e6c7f3d10e55ca4b
parent 5210dbd4c70a8c4aa9828eaf981c2a0fd2c94165
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Tue, 11 Aug 2015 08:37:02 -0400

Merge branch 'issue1238' into develop.  Issue #1238.

Diffstat:
Munpacked/extensions/MathML/content-mathml.js | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/unpacked/extensions/MathML/content-mathml.js b/unpacked/extensions/MathML/content-mathml.js @@ -93,6 +93,7 @@ MathJax.Extension["MathML/content-mathml"] = (function(HUB) { /* Transform a Content MathML element into Presentation MathML, and return the new element */ transformElement: function(element) { + if (element.nodeName.indexOf(":") >= 0) element = CToP.cloneNode(element,true); // removes namespaces var mathNode = CToP.cloneNode(element); for (var j = 0, l = element.childNodes.length; j<l; j++ ) { CToP.applyTransform(mathNode,element.childNodes[j],0); @@ -137,10 +138,10 @@ MathJax.Extension["MathML/content-mathml"] = (function(HUB) { /* Create an element with given name, belonging to the MathML namespace */ createElement: function(name) { - var math = (isMSIE ? document.createElement("m:"+name) : - document.createElementNS("http://www.w3.org/1998/Math/MathML",name)); - math.isMathJax = true; - return math; + name = name.replace(/^.*:/,""); // remove namespace + return (document.createElementNS ? + document.createElementNS("http://www.w3.org/1998/Math/MathML",name) : + document.createElement("m:"+name)); }, /* Get node's children