diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js
index ec9ac237f..0407b35ab 100644
--- a/unpacked/jax/output/HTML-CSS/jax.js
+++ b/unpacked/jax/output/HTML-CSS/jax.js
@@ -794,7 +794,7 @@
},
getJaxFromMath: function (math) {
- if (math.parentNode.className === "MathJax_Display") {math = math.parentNode}
+ if (math.parentNode.className.match(/MathJax_Display/)) {math = math.parentNode}
do {math = math.nextSibling} while (math && math.nodeName.toLowerCase() !== "script");
return HUB.getJaxFor(math);
},
diff --git a/unpacked/jax/output/PlainSource/jax.js b/unpacked/jax/output/PlainSource/jax.js
index f71587e58..5ff4eaaac 100644
--- a/unpacked/jax/output/PlainSource/jax.js
+++ b/unpacked/jax/output/PlainSource/jax.js
@@ -141,7 +141,7 @@
postTranslate: function(state) {},
getJaxFromMath: function(math) {
- if (math.parentNode.className === "MathJax_PlainSource_Display") math = math.parentNode;
+ if (math.parentNode.className.match(/MathJax_PlainSource_Display/)) math = math.parentNode;
do {math = math.nextSibling} while (math && math.nodeName.toLowerCase() !== "script");
return HUB.getJaxFor(math);
},
diff --git a/unpacked/jax/output/PreviewHTML/jax.js b/unpacked/jax/output/PreviewHTML/jax.js
index 7752699a8..b86ad7867 100644
--- a/unpacked/jax/output/PreviewHTML/jax.js
+++ b/unpacked/jax/output/PreviewHTML/jax.js
@@ -276,7 +276,7 @@
},
getJaxFromMath: function (math) {
- if (math.parentNode.className === "MathJax_PHTML_Display") {math = math.parentNode}
+ if (math.parentNode.className.match(/MathJax_PHTML_Display/)) {math = math.parentNode}
do {math = math.nextSibling} while (math && math.nodeName.toLowerCase() !== "script");
return HUB.getJaxFor(math);
},
diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js
index d8edf98c4..db854e125 100644
--- a/unpacked/jax/output/SVG/jax.js
+++ b/unpacked/jax/output/SVG/jax.js
@@ -413,7 +413,7 @@
},
getJaxFromMath: function (math) {
- if (math.parentNode.className === "MathJax_SVG_Display") {math = math.parentNode}
+ if (math.parentNode.className.match(/MathJax_SVG_Display/)) {math = math.parentNode}
do {math = math.nextSibling} while (math && math.nodeName.toLowerCase() !== "script");
return HUB.getJaxFor(math);
},