Skip to content

Commit 6d689b1

Browse files
committed
Merge pull request mathjax#1504 from dpvc/respeq119
Make getJaxForMath() work even during chunking.
2 parents c0c63b1 + 0d192eb commit 6d689b1

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

unpacked/jax/output/HTML-CSS/jax.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@
794794
},
795795

796796
getJaxFromMath: function (math) {
797-
if (math.parentNode.className === "MathJax_Display") {math = math.parentNode}
797+
if (math.parentNode.className.match(/MathJax_Display/)) {math = math.parentNode}
798798
do {math = math.nextSibling} while (math && math.nodeName.toLowerCase() !== "script");
799799
return HUB.getJaxFor(math);
800800
},

unpacked/jax/output/PlainSource/jax.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
postTranslate: function(state) {},
142142

143143
getJaxFromMath: function(math) {
144-
if (math.parentNode.className === "MathJax_PlainSource_Display") math = math.parentNode;
144+
if (math.parentNode.className.match(/MathJax_PlainSource_Display/)) math = math.parentNode;
145145
do {math = math.nextSibling} while (math && math.nodeName.toLowerCase() !== "script");
146146
return HUB.getJaxFor(math);
147147
},

unpacked/jax/output/PreviewHTML/jax.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
},
277277

278278
getJaxFromMath: function (math) {
279-
if (math.parentNode.className === "MathJax_PHTML_Display") {math = math.parentNode}
279+
if (math.parentNode.className.match(/MathJax_PHTML_Display/)) {math = math.parentNode}
280280
do {math = math.nextSibling} while (math && math.nodeName.toLowerCase() !== "script");
281281
return HUB.getJaxFor(math);
282282
},

unpacked/jax/output/SVG/jax.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@
413413
},
414414

415415
getJaxFromMath: function (math) {
416-
if (math.parentNode.className === "MathJax_SVG_Display") {math = math.parentNode}
416+
if (math.parentNode.className.match(/MathJax_SVG_Display/)) {math = math.parentNode}
417417
do {math = math.nextSibling} while (math && math.nodeName.toLowerCase() !== "script");
418418
return HUB.getJaxFor(math);
419419
},

0 commit comments

Comments
 (0)