Merge branch 'issue1018' into develop. Issue #1018.
This commit is contained in:
commit
f6b374813f
|
@ -96,23 +96,18 @@
|
||||||
return this.postFilter(preview,data);
|
return this.postFilter(preview,data);
|
||||||
},
|
},
|
||||||
postFilter: function (preview,data) {
|
postFilter: function (preview,data) {
|
||||||
try {
|
//
|
||||||
data.math.root.toCommonHTML(preview);
|
// Load the CommonHTML jax if it is not already loaded
|
||||||
} catch (err) {
|
//
|
||||||
//
|
if (!data.math.root.toCommonHTML) {
|
||||||
// Load the CommonHTML jax if it is not already loaded
|
var queue = MathJax.Callback.Queue();
|
||||||
//
|
queue.Push(
|
||||||
if (!data.math.root.toCommonHTML) {
|
["Require",MathJax.Ajax,"[MathJax]/jax/output/CommonHTML/config.js"],
|
||||||
var queue = MathJax.Callback.Queue();
|
["Require",MathJax.Ajax,"[MathJax]/jax/output/CommonHTML/jax.js"]
|
||||||
queue.Push(
|
);
|
||||||
["Require",MathJax.Ajax,"[MathJax]/jax/output/CommonHTML/config.js"],
|
HUB.RestartAfter(queue.Push({}));
|
||||||
["Require",MathJax.Ajax,"[MathJax]/jax/output/CommonHTML/jax.js"]
|
|
||||||
);
|
|
||||||
HUB.RestartAfter(queue.Push({}));
|
|
||||||
}
|
|
||||||
if (!err.restart) {throw err} // an actual error
|
|
||||||
return MathJax.Callback.After(["postFilter",this,preview,data],err.restart);
|
|
||||||
}
|
}
|
||||||
|
data.math.root.toCommonHTML(preview);
|
||||||
},
|
},
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -135,6 +130,8 @@
|
||||||
CHTMLpreview.Register("AsciiMath");
|
CHTMLpreview.Register("AsciiMath");
|
||||||
|
|
||||||
HUB.Register.StartupHook("End Config",["Config",CHTMLpreview]);
|
HUB.Register.StartupHook("End Config",["Config",CHTMLpreview]);
|
||||||
|
|
||||||
|
HUB.Startup.signal.Post("CHTML-preview Ready");
|
||||||
|
|
||||||
})(MathJax.Hub,MathJax.HTML);
|
})(MathJax.Hub,MathJax.HTML);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user