New hook MathFormulaPostRender (replaces MathFormulaRendered)

* Update hook to new extension registration mechanism
* Expose full parser context

Change-Id: I201f80bbee16617ef88417a2430261167aaca4ae
This commit is contained in:
physikerwelt (Moritz Schubotz) 2015-02-08 19:01:14 +01:00 committed by Physikerwelt
parent a240ca5393
commit c8edf95e80
1 changed files with 2 additions and 5 deletions

View File

@ -123,11 +123,8 @@ class MathHooks {
wfDebugLog( "Math" , "Rendering failed. Printing error message." );
return $renderer->getLastError();
}
wfRunHooks( 'MathFormulaRendered',
array( &$renderer,
&$renderedMath,
$parser->getTitle()->getArticleID(),
$parser->nextLinkID() ) );// Enables indexing of math formula
Hooks::run( 'MathFormulaPostRender',
array( $parser, &$renderer, &$renderedMath ) );// Enables indexing of math formula
if ( $mode == MW_MATH_MATHJAX || $mode == MW_MATH_LATEXML_JAX ) {
$parser->getOutput()->addModules( array( 'ext.math.mathjax.enabler' ) );
}