(new GeSHi tag syntaxhighlight) |
|||
Line 249: | Line 249: | ||
Some [[HTML]] tags are allowed in MediaWiki, for example <tt><div></tt>, <tt><span></tt> and <tt><font> </tt>. | Some [[HTML]] tags are allowed in MediaWiki, for example <tt><div></tt>, <tt><span></tt> and <tt><font> </tt>. | ||
If you want to use <tt><code></tt>, you should definitely use <tt><syntaxhighlight></tt> instead! It supports Syntax Coloring. You can also specify a language, eg. <tt>< | If you want to use <tt><code></tt>, you should definitely use <tt><syntaxhighlight></tt> instead! It supports Syntax Coloring. You can also specify a language, eg. <tt><syntaxhighlight lang="c" line start="55" highlight="4"></tt> : | ||
< | <syntaxhighlight lang="c" line start="55" highlight="4"> | ||
// Global variable | // Global variable | ||
int x = 7; | int x = 7; | ||
Line 260: | Line 260: | ||
return (a + b); | return (a + b); | ||
} | } | ||
</ | </syntaxhighlight> | ||
Please see the [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi MediaWiki GeSHi Page] for detailed information to use some of the parameters: | Please see the [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi MediaWiki GeSHi Page] for detailed information to use some of the parameters: |