Skip to content

Commit

Permalink
Fix problem with namespaces on internal element. Resolves mathjax#1755.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed May 30, 2017
1 parent 3338073 commit 9995727
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions unpacked/extensions/MathML/content-mathml.js
Expand Up @@ -216,15 +216,16 @@ MathJax.Extension["MathML/content-mathml"] = (function(HUB) {
parentNode.appendChild(merror);
return;
}
var nodeName = contentMMLNode.nodeName.replace(/.*:/,'');
if (contentMMLNode.nodeType === 1) {
if (CToP.tokens[contentMMLNode.nodeName]) {
CToP.tokens[contentMMLNode.nodeName](parentNode,contentMMLNode,precedence);
if (CToP.tokens[nodeName]) {
CToP.tokens[nodeName](parentNode,contentMMLNode,precedence);
} else if (contentMMLNode.childNodes.length === 0) {
var mml = CToP.MML[contentMMLNode.nodeName];
var mml = CToP.MML[nodeName];
if (mml && mml.isa && mml.isa(CToP.mbase)) {
parentNode.appendChild(CToP.cloneNode(contentMMLNode));
} else {
CToP.appendToken(parentNode,'mi',contentMMLNode.nodeName);
CToP.appendToken(parentNode,'mi',nodeName);
}
} else {
var clonedChild = CToP.cloneNode(contentMMLNode);
Expand Down

0 comments on commit 9995727

Please sign in to comment.