mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-15 02:24:07 +00:00
* Avoid unstubbing parser too early
This commit is contained in:
parent
f4b2e86941
commit
76a0e4416e
|
@ -55,7 +55,11 @@ $dir = dirname(__FILE__) . '/';
|
|||
$wgExtensionMessagesFiles['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeSHi.i18n.php';
|
||||
$wgAutoloadClasses['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeSHi.class.php';
|
||||
$wgHooks['ShowRawCssJs'][] = 'SyntaxHighlight_GeSHi::viewHook';
|
||||
$wgExtensionFunctions[] = 'efSyntaxHighlight_GeSHiSetup';
|
||||
if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
|
||||
$wgHooks['ParserFirstCallInit'][] = 'efSyntaxHighlight_GeSHiSetup';
|
||||
} else {
|
||||
$wgExtensionFunctions[] = 'efSyntaxHighlight_GeSHiSetup';
|
||||
}
|
||||
|
||||
/**
|
||||
* Register parser hook
|
||||
|
@ -63,4 +67,5 @@ $wgExtensionFunctions[] = 'efSyntaxHighlight_GeSHiSetup';
|
|||
function efSyntaxHighlight_GeSHiSetup() {
|
||||
global $wgParser;
|
||||
$wgParser->setHook( 'source', array( 'SyntaxHighlight_GeSHi', 'parserHook' ) );
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue