Fixed mathjax might parse not specified elements and now pass array of elements

This commit is contained in:
Cheng-Han, Wu 2016-02-24 10:35:52 +08:00
parent 1da0b87714
commit daf4c9dcae

View file

@ -208,10 +208,8 @@ function finishView(view) {
//mathjax
var mathjaxdivs = view.find('.mathjax.raw').removeClass("raw").toArray();
try {
for (var i = 0; i < mathjaxdivs.length; i++) {
MathJax.Hub.Queue(["Typeset", MathJax.Hub, mathjaxdivs[i].innerHTML]);
MathJax.Hub.Queue(viewAjaxCallback);
}
MathJax.Hub.Queue(["Typeset", MathJax.Hub, mathjaxdivs]);
MathJax.Hub.Queue(viewAjaxCallback);
} catch (err) {}
//sequence diagram
var sequences = view.find(".sequence-diagram.raw").removeClass("raw");