Extension:ASHighlight

This extension adds the '''

Note that this extension assumes PHP 5. It was tested using MediaWiki 1.9.3 on PHP 5.1.6, with highlight 2.4.5 on Ubuntu 6.10.


 * See Discussion Page for fix that works for MW 11.1.0

Usage
Use a 'source' HTML-style tag in your wiki code, and give it a 'lang' attribute that matches the standard file extension for your source code, eg 'c' for C code, 'cpp' for C++ code, 'py' for Python, etc. For example:

Example
You can see this extension in action at


 * http://ascend4.org/ExtPy (Python highlighting)
 * http://ascend4.org/Calculation_of_sun_position (highlighting in the ASCEND language)

Aborts PdfBook export
Using this extension in combination with Extension:Pdf_Book may block the export of articles containing the tag, as well as subsequent articles in the generated PDF. This does not affect the intermediate HTML export. Unfortunately, the current workaround is to use Extension:SyntaxHighlight GeSHi instead of ASHighlight.

(Occured with MediaWiki v1.12.0 / PdfBook v0.0.9)