Is it possible to write </syntaxhighlight> inside a syntaxhighlight without being interpreted as the end of it ? I mean, it's possible, since the presentation page did it… But reading the source code didn't give me a clue about how to do it!
Topic on Extension talk:SyntaxHighlight
You have to use {{#tag:syntaxhighlight|...}}
for the actual highlighting, putting the code to be highlighted in place of the ...
. However, if you’d just put <syntaxhighlight></syntaxhighlight>
there, MediaWiki tried to interpret that as well, resulting in something like '"`UNIQ--syntaxhighlight-00000001-QINU`"'
being the content. You have to stop MediaWiki somehow from interpreting the content, which can be done in several ways. This page replaces the leading <
sign with a call to the template {{^(}}, but if you don’t want to create a such template on your wiki, putting a <nowiki />
somewhere in the middle of the opening tag (e.g. <syntax<nowiki />highlight>
) should also work.
It looks like the "nowiki" tag can't be used simultaneously with the #tag thing on my MediaWiki without the #tag thing bugging. But I'll do with the template thing.
Thank you