mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 19:26:31 -05:00
Fixed mathjax queue might parse whole page if pass an empty or single item array
This commit is contained in:
parent
daf4c9dcae
commit
fae3c02bb2
1 changed files with 7 additions and 2 deletions
|
@ -208,8 +208,13 @@ function finishView(view) {
|
|||
//mathjax
|
||||
var mathjaxdivs = view.find('.mathjax.raw').removeClass("raw").toArray();
|
||||
try {
|
||||
MathJax.Hub.Queue(["Typeset", MathJax.Hub, mathjaxdivs]);
|
||||
MathJax.Hub.Queue(viewAjaxCallback);
|
||||
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 a new issue