SLeepdepD

Extension talk:SyntaxHighlight GeSHi – MediaWiki

by on Dec.02, 2010, under Programming, Technology

Alternative Hook To “syntaxhighlight”

I’m using Mediawiki and this extension for a code snippet repository and it’s working great. I am finding typing “syntaxhighlight” all the time to be a little cumbersome, so I added the following to the “SyntaxHighlight_GeSHi.php” in the “efSyntaxHighlight_GeSHiSetup” function:

$parser->setHook( 'sh', array( 'SyntaxHighlight_GeSHi', 'parserHook' ) );

Now I can just use “sh” in addition to “syntaxhighlight”.

via Extension talk:SyntaxHighlight GeSHi – MediaWiki.

:, , ,

Leave a Reply