Skip to content

Commit 2f5b3ee

Browse files
committed
It's OK to change the original 'document', since it is a temporary MathML tree that is used to create the internal JS version and then is discarded. It is replaced by the result of content-mathml anyway.
1 parent 47a7f1f commit 2f5b3ee

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

unpacked/extensions/MathML/content-mathml.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,9 +1319,7 @@ MathJax.Extension["MathML/content-mathml"] = (function(HUB) {
13191319
CToP.applyTransform(mrow,children[1],2);
13201320
} else if (arg.nodeName === 'apply' && children.length>2 && children[0].nodeName === 'times' && children[1].nodeName === 'cn' && (n = Number(CToP.getTextContent(children[1]))) < 0) {
13211321
CToP.appendToken(mrow,'mo','\u2212');
1322-
arg = arg.cloneNode(true);
1323-
children = CToP.getChildren(arg);
1324-
children[1].textContent = -n;
1322+
children[1].textContent = -n; // OK to change MathML since it is being discarded afterward
13251323
CToP.applyTransform(mrow,arg,2);
13261324
} else{
13271325
CToP.appendToken(mrow,'mo','+');

0 commit comments

Comments
 (0)