←  Data Bunker

Fallout Studios Forums

»

New extension installed: Syntax highlighting

CodeCat's Photo CodeCat 09 Sep 2009

I've installed a syntax highlighting extension onto the wiki. Usage is like a <pre> block, except that it highlights the keywords and symbols that are part of the language, making them easier to pick out. It supports a whole bunch of languages, and you must explicitly specify which language is being used (highlighting C++ code as HTML for example would be stupid, after all).

Usage is as follows:

<source lang=&#34;xxxxx&#34;>
&#40;code to be highlighted&#41;
</source>


Where xxxxx is the language code. Most useful are probably c, cpp, java, php, html4strict, javascript, ini (great for the Generals modding manual!). See the Syntax highlighting extension manual for more details.
Quote