commit 1abb78e9c93786e5faa441fe506d96a7bbf2a205
parent 31e4b98a5874ccb7f899702f52c98c3d82e5cfac
Author: Davide P. Cervone <dpvc@union.edu>
Date: Tue, 25 Aug 2015 15:32:24 -0400
Merge branch 'semantic-enhance' into develop
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js
@@ -2172,13 +2172,15 @@ MathJax.Hub = {
if (!script.MathJax.elementJax || script.MathJax.state === STATE.UPDATE) {
this.checkScriptSiblings(script); // remove preJax/postJax etc.
var type = script.type.replace(/ *;(.|\s)*/,""); // the input jax type
- jax = this.inputJax[type].Process(script,state); // run the input jax
+ var input = this.inputJax[type]; // the input jax itself
+ jax = input.Process(script,state); // run the input jax
if (typeof jax === 'function') { // if a callback was returned
if (jax.called) continue; // go back and call Process() again
this.RestartAfter(jax); // wait for the callback
}
- jax.Attach(script,this.inputJax[type].id); // register the jax on the script
+ jax = jax.Attach(script,input.id); // register the jax on the script
this.saveScript(jax,state,script,STATE); // add script to state
+ this.postInputHooks.Execute(jax,input.id,script); // run global jax filters
} else if (script.MathJax.state === STATE.OUTPUT) {
this.saveScript(script.MathJax.elementJax,state,script,STATE); // add script to state
}
@@ -2198,6 +2200,7 @@ MathJax.Hub = {
state.start = new Date().getTime(); state.i = state.j = 0;
return null;
},
+ postInputHooks: MathJax.Callback.Hooks(true), // hooks to run after element jax is created
saveScript: function (jax,state,script,STATE) {
//
// Check that output jax exists