Inline Syntax Highlighting in MediaWiki

Amelio Vazquez-Reina picture Amelio Vazquez-Reina · Feb 3, 2011 · Viewed 8.7k times · Source

Is there any MediaWiki extension that supports inline syntax highlighting? (i.e. with support for code snippets embedded within regular text paragraphs)

I currently use SyntaxHighlight GeSHi, but I'm not sure it supports inline highlighting.

Answer

earldouglas picture earldouglas · Feb 3, 2011

You can add enclose="none" to your <source> tag:

There is <source lang="mylanguage" enclose="none">inline code</source> in this paragraph.