MediaWiki/Syntax highlighting: Difference between revisions

m MediaWiki/Syntax highlighting moved to MediaWiki/Syntax highlighting: not to be confused with the general article on Syntax Highlighting
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight"
 
Line 11: Line 11:
== Usage ==
== Usage ==


Just use the '''<nowiki><source></nowiki>''' tag with the ''lang'' parameter to define the programming language.  Other optional parameters are avaliable too.  See the example below.
Just use the '''<nowiki><syntaxhighlight></nowiki>''' tag with the ''lang'' parameter to define the programming language.  Other optional parameters are avaliable too.  See the example below.


== Parameters ==
== Parameters ==
Line 30: Line 30:


== Example ==
== Example ==
<source lang="php" line>
<syntaxhighlight lang="php" line>
<?php
<?php
if( !defined( 'MEDIAWIKI' ) )
if( !defined( 'MEDIAWIKI' ) )
Line 50: Line 50:


?>
?>
</source>
</syntaxhighlight>