summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--public/js/extra.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/public/js/extra.js b/public/js/extra.js
index 200a4652..a82a53c2 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -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");