How do I ass C, Python or any other type of source code into my wiki pages? I tried code type="C" but that didn't quite work. Are there some examples out there?
Topic on Project:Support desk
By default <pre>...</pre>
is available for wiki pages:
Like this
If you install Extension:SyntaxHighlight GeSHi (like Wikipedia.org and MediaWiki.org do), then you can use <syntaxhighlight>...</syntaxhighlight>
, like this:
<syntaxhighlight lang="javascript"> function foo(a, b, c) { return a + b + c; } </syntaxhighlight>
Which renders with preserved whitespace in a monospace font, and with syntax highlighting:
function foo(a, b, c) {
return a + b + c;
}