Template:Code

From Valve Developer Community
Revision as of 09:39, 9 August 2023 by Pee (talk | contribs) (The problem was that it was forcing syntaxhighlight, which doesn't apply some required logic, resulting in things like not interpreting links as such. The solution is to default to no syntax highlighting)
Jump to navigation Jump to search
English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
Page history

This template will allow you to format text as a one-line code.

Usage

This template prefers inline formatting of parameters
Parameters Description Preview
| <Text>
| 1 = <Text>
The text that will be displayed. Can contain links, templates and raw html, except when the {{{lang}}} parameter is used. Hello, World!|Hello, World!}}
| lang = <Option> Adds syntax highlighting for the language specified using syntaxhighlight tag with inline attribute.
List of Supported languages.
int main() { return 0; }|int main() { return 0; } }}
| style = <CSS> !important}} to be specified. Colored text|Colored text}}

See Also