diff --git a/unpacked/extensions/MathML/content-mathml.js b/unpacked/extensions/MathML/content-mathml.js index 666300b19..874e69fff 100644 --- a/unpacked/extensions/MathML/content-mathml.js +++ b/unpacked/extensions/MathML/content-mathml.js @@ -1317,9 +1317,9 @@ MathJax.Extension["MathML/content-mathml"] = (function(HUB) { } else if (arg.nodeName === 'apply' && children.length === 2 && children[0].nodeName === 'minus') { CToP.appendToken(mrow,'mo','\u2212'); CToP.applyTransform(mrow,children[1],2); - } else if (arg.nodeName === 'apply' && children.length>2 && children[0].nodeName === 'times' && children[1].nodeName === 'cn' && ( n = Number(CToP.getTextContent(children[1])) < 0)) { + } else if (arg.nodeName === 'apply' && children.length>2 && children[0].nodeName === 'times' && children[1].nodeName === 'cn' && (n = Number(CToP.getTextContent(children[1]))) < 0) { CToP.appendToken(mrow,'mo','\u2212'); - CToP.getTextContent(children[1]) = -n;// fix me: modifying document + children[1].textContent = -n; // OK to change MathML since it is being discarded afterward CToP.applyTransform(mrow,arg,2); } else{ CToP.appendToken(mrow,'mo','+');