Extension:GoogleCodePrettify

This extension adds syntaxhighlight tag using Google Code Prettify library.

Installation

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


 * Add the following line to the bottom of LocalSettings.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 in LocalSettings.php:

Additional languages
By default GoogleCodePrettify enables these languages:


 * C and friends.
 * Java.
 * Python.
 * Bash.
 * SQL.
 * HTML.
 * XML.
 * CSS.
 * JavaScript.
 * Makefiles.
 * Ruby.
 * PHP.
 * Awk.
 * Perl.
 * YAML.

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