mirror of https://github.com/status-im/codimd.git
Fixed mathjax queue might parse whole page if pass an empty or single item array
This commit is contained in:
parent
daf4c9dcae
commit
fae3c02bb2
|
@ -208,8 +208,13 @@ function finishView(view) {
|
|||
//mathjax
|
||||
var mathjaxdivs = view.find('.mathjax.raw').removeClass("raw").toArray();
|
||||
try {
|
||||
if (mathjaxdivs.length > 1) {
|
||||
MathJax.Hub.Queue(["Typeset", MathJax.Hub, mathjaxdivs]);
|
||||
MathJax.Hub.Queue(viewAjaxCallback);
|
||||
} else if (mathjaxdivs.length > 0) {
|
||||
MathJax.Hub.Queue(["Typeset", MathJax.Hub, mathjaxdivs[0]]);
|
||||
MathJax.Hub.Queue(viewAjaxCallback);
|
||||
}
|
||||
} catch (err) {}
|
||||
//sequence diagram
|
||||
var sequences = view.find(".sequence-diagram.raw").removeClass("raw");
|
||||
|
|
Loading…
Reference in New Issue