Topic on Extension talk:SyntaxHighlight

Is there a defined language for MediaWiki syntax?

7
Epok (talkcontribs)

I would like to use the <source> tag to present MediaWiki wikicode, but I couldn't find any related lexer. Is there any one I can use?

Dinoguy1000 (talkcontribs)
Epok (talkcontribs)

Thanks for the link. Too bad MediaWiki doesn't support its own syntax!

IKhitron (talkcontribs)

Two points:

  1. Try html. It's better than nothing.
  2. The tag source is deprecated. Use syntaxhighlight instead.
Cedar101 (talkcontribs)
Dinoguy1000 (talkcontribs)

MediaWiki's syntax was mostly derived from UseModWiki's, not Moinmoin's, which shouldn't be particularly surprising since UseMod was its predecessor on WMF wikis. (Where the syntax ultimately comes from is a completely different question, of course, and one I'm not sure would be particularly easy to answer.)

Of course, this doesn't really matter much for syntax highlighting; as long as the markup systems are sufficiently similar to each other, using Moinmoin's lexer for MediaWiki markup should still be a decent stopgap.

Epok (talkcontribs)

Yet, I tried 'lang=moin', and it doesn't really do anything concerning syntax highlight. Precision: what I'm trying to show in the code is template inclusion. Anyway, I just would like that the page I created were not automatically categorized as a "Page with syntax highlighting errors". I think the only way to do so is not to use this tag...

Reply to "Is there a defined language for MediaWiki syntax?"