From 68f9e962402d9195b5a3a5249dfd603a2c9de1c0 Mon Sep 17 00:00:00 2001 From: "physikerwelt (Moritz Schubotz)" Date: Sun, 13 Jul 2014 00:19:28 +0200 Subject: [PATCH] Add new MathHook * Adds a new hook that is called after the rendering this is required to keep the MathIndex up to date for the MathSearch extension. * The hook can be used for special modifications of the output format. Change-Id: I7b45b4398c10ffe75f481a82c149ba4f66820338 --- Math.hooks.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Math.hooks.php b/Math.hooks.php index 28913eef9..65819a180 100644 --- a/Math.hooks.php +++ b/Math.hooks.php @@ -126,7 +126,11 @@ 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 if ( $wgUseMathJax ) { $parser->getOutput()->addModules( array( 'ext.math.mathjax.enabler' ) ); }