Skip to content

Commit ec3cf0a

Browse files
authored
Merge pull request #1592 from dpvc/issue1575
Fix incorrect assignment in content-mathml extension. #1575
2 parents 405687b + 2f5b3ee commit ec3cf0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

unpacked/extensions/MathML/content-mathml.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,9 +1317,9 @@ MathJax.Extension["MathML/content-mathml"] = (function(HUB) {
13171317
} else if (arg.nodeName === 'apply' && children.length === 2 && children[0].nodeName === 'minus') {
13181318
CToP.appendToken(mrow,'mo','\u2212');
13191319
CToP.applyTransform(mrow,children[1],2);
1320-
} else if (arg.nodeName === 'apply' && children.length>2 && children[0].nodeName === 'times' && children[1].nodeName === 'cn' && ( n = Number(CToP.getTextContent(children[1])) < 0)) {
1320+
} 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-
CToP.getTextContent(children[1]) = -n;// fix me: modifying document
1322+
children[1].textContent = -n; // OK to change MathML since it is being discarded afterward
13231323
CToP.applyTransform(mrow,arg,2);
13241324
} else{
13251325
CToP.appendToken(mrow,'mo','+');

0 commit comments

Comments
 (0)