www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit f6b374813f8435c57d81f609b37e78de30dd56c0
parent 20e1e01735b1bc029e962ff7fbc10671f15e8df1
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Sat, 24 Jan 2015 13:38:00 -0500

Merge branch 'issue1018' into develop.  Issue #1018.

Diffstat:
Munpacked/extensions/CHTML-preview.js | 29+++++++++++++----------------
1 file changed, 13 insertions(+), 16 deletions(-)

diff --git a/unpacked/extensions/CHTML-preview.js b/unpacked/extensions/CHTML-preview.js @@ -96,23 +96,18 @@ return this.postFilter(preview,data); }, postFilter: function (preview,data) { - try { - data.math.root.toCommonHTML(preview); - } catch (err) { - // - // Load the CommonHTML jax if it is not already loaded - // - if (!data.math.root.toCommonHTML) { - var queue = MathJax.Callback.Queue(); - queue.Push( - ["Require",MathJax.Ajax,"[MathJax]/jax/output/CommonHTML/config.js"], - ["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); + // + // Load the CommonHTML jax if it is not already loaded + // + if (!data.math.root.toCommonHTML) { + var queue = MathJax.Callback.Queue(); + queue.Push( + ["Require",MathJax.Ajax,"[MathJax]/jax/output/CommonHTML/config.js"], + ["Require",MathJax.Ajax,"[MathJax]/jax/output/CommonHTML/jax.js"] + ); + HUB.RestartAfter(queue.Push({})); } + data.math.root.toCommonHTML(preview); }, // @@ -135,6 +130,8 @@ CHTMLpreview.Register("AsciiMath"); HUB.Register.StartupHook("End Config",["Config",CHTMLpreview]); + + HUB.Startup.signal.Post("CHTML-preview Ready"); })(MathJax.Hub,MathJax.HTML);