Extension:GoogleCodePrettify

This extension adds syntaxhighlight tag using Google Code Prettify library.

Installation

 * Clone repository of the extension into your extensions/GoogleCodePrettify directory.

cd $MEDIAWIKI_ROOT git clone git://github.com/Undev/MediaWiki-GoogleCodePrettify.git extensions/GoogleCodePrettify


 * Add the following line to the bottom of LocalSettings.php

require_once ( "$IP/extensions/GoogleCodePrettify/GoogleCodePrettify.php" );

syntaxhighlight tag
Google Code Prettify automatically recognizes language of source code. But you can set it using lang attribute.

Enable handling of source tag
Handling of source tag disabled by default and is not recommended.

You can override this behavior by setting global $wgGoogleCodePrettifyAllowSourceTag variable to true.

Additional languages
By default GoogleCodePrettify enables core languages plus css, sql and yaml.

You can add or remove supported languages by changing of global $wgGoogleCodePrettifyAdditionalLanguages array variable.