Template:code/documentation

This is a convenience template, which formats a short inline snippet of code with syntax highlighting of a given language. The language is specified in 1 (the first positional parameter), while 2 (the second positional parameter) is the snippet to format. If the snippet contains an equal sign, precede it with.

Typical values for 1: The possible values are those understood by the tag.
 * or omitted: Raw text. This simply applies a monospaced font, similarly to surrounding the snipped with.
 * : Lua code.
 * or :  code.
 * or :  code.

It is similar to Wikipedia's w:Template:code, but the argument order is opposite.

Example

 * renders as foo("bar").
 * renders as js.