Help:Syntax Highlighting: Difference between revisions

Note about language template "tags" parameter
(Largely rewrote. (I removed the <lang list> here to encourage users to check the hand-maintained list on the Village Pump.))
(Note about language template "tags" parameter)
Line 1:
Rosetta Code supports syntax highlighting of code using [http://sourceforge.net/projects/geshi/ GeSHi], the Generic Syntax Highlighter.
 
At the moment, the wiki is switching from old-style to new-style highlighting. Old-style highlighting will still work for a while, but only the new style is documented below.
 
== How to highlight ==
Line 22 ⟶ 20:
== Supported languages ==
See [[Rosetta Code:Village Pump/Syntax Highlighting#Language tags|this post on the Village Pump]] for a list of language names. Make sure to use the standard identifier for your language even if GeSHi doesn't know how to highlight it yet. If your language isn't in the list, make up an identifier (consisting entirely of lowercase alphanumeric ASCII characters; make it short yet unambiguous) and add it to the list. That way, if your language is supported in a future release of GeSHi, Rosetta Code can immediately benefit.
 
Also, if it hasn't been done yet, add the identifier to your language's category page. Use the "tags" parameter in the [[Template:Language|language template]] to specify it (e.g. "tags=foo" for the example above). If you find that your language already has a tag listed there that isn't in the Village Pump post, add it to the post as well.
 
If you'd like to, it's surprisingly easy to write a new language definition for GeSHi. See [[Rosetta Code:Village Pump/Syntax Highlighting#Relationship Between Rosetta Code and GeSHi|this post]] for more on the relationship between GeSHi and Rosetta Code.
Anonymous user