GeShi is a syntax highlighting tool used by projects and vendors like MediaWiki and pastebin.com, respectively.

However, GeShi does not natively support MediaWiki markup syntax. What would be the closest "look alike" that I could use to highlight a MediaWiki template?

有帮助吗?

解决方案

I doubt there is any. MediaWiki's syntax is a bit unique. It's more than just markup language for creating single text documents, it's for creating whole sites. The difference is relations between documents: linking, redirections and embedding one into another (templates).

BTW creating good syntax highlight for MediaWiki syntax is not possible, and all this because of templates. For example:

{{{!}}
! a !! b
{{!}}}

Above would be completely valid table on the English Wikipedia because {{!}} resolves to |, so exclamation marks in second line should be highlighted as in table, but you can't tell that if you're not able to resolve templates. (However not-that-good highlight could be found in Vim).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top