Question

Is it possible to indent a block of code in MediaWiki using SyntaxHighlight GeSHi?

For example, I would like the code container below to be aligned with the third-level list

* This is plain text of a first-level list to be rendered by MediaWiki
** This is plain text of a a second-level list to be rendered by MediaWiki
*** This is plain text of a third-level list to be rendered by MediaWiki

<source lang="Cpp">
int main(int argc, char** argv)
{
    my_function(4, 1, 2, 3);
    return 0;
}
</source>

I have tried wrapping the GeSHi code container with colons (using MediaWiki's standard indentation syntax), but that prevents SyntaxHighlight GeSHi from parsing the code correctly.

Just to clarify, I would like to avoid wrapping my code with <code></code> as I need proper syntax highlighting.

Any suggestions?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top