MediaWiki/Syntax highlighting: Difference between revisions
inital draft |
No edit summary |
||
| Line 1: | Line 1: | ||
Writing good code follows good coding standards. On top of coding standards, syntax highlighting reveals the code making it easier to read (and learn). | Writing good code follows good coding standards. On top of coding standards, syntax highlighting reveals the code making it easier to read (and learn). | ||
There is a [http://qbnz.com/highlighter/faq.php Generic Syntax Highlighter] or GeSHi for short which is available as a Debian package (sudo apt-get install php-geshi). Adding | There is a [http://qbnz.com/highlighter/faq.php Generic Syntax Highlighter] or GeSHi for short which is available as a Debian package (sudo apt-get install php-geshi). Adding [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi Brion Vibber's extension] (is better than this alternate [http://meta.wikimedia.org/wiki/GeSHiCodeTag_Extension GeSHi Code Tag] extension because Brion's just registers one new tag: 'source' and uses the extension parameter passing available since MW 1.5) extension to allows it to be used in this wiki. | ||
Incorporating it into Mediawiki is just a matter of creating/configuring the extension and including it in LocalSettings. | Incorporating it into Mediawiki is just a matter of creating/configuring the extension and including it in LocalSettings. | ||