don't decorate non math

This commit is contained in:
Sam 2017-11-20 15:06:24 +11:00
parent 669f756b34
commit 0329745f84
1 changed files with 6 additions and 1 deletions

View File

@ -8,7 +8,7 @@ function initMathJax() {
if (initializedMathJax) { return; }
var extensions = ["toMathML.js", "Safe.js"];
if (enable_accessibility) {
extensions.push("[a11y]/accessibility-menu.js");
}
@ -65,6 +65,11 @@ function decorate(elem, isPreview){
}
function mathjax($elem) {
if (!$elem || !$elem.find) {
return;
}
const mathElems = $elem.find('.math');
if (mathElems.length > 0) {