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

This commit is contained in:
Davide P. Cervone 2015-08-11 08:37:02 -04:00
commit 49bdd1e9fa

View File

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