Template:Sthl
{{#vardefine: docpage_link|Template:Sthl/doc}}
Template:Sthl/doc
Based on https://cosmoteer.wiki.gg/wiki/Template:Sthl
A template version of <syntaxhighlight> (with a few additions and limitations). One of biggest differences is that the content you pass is expanded, meaning if you wish to pass a template expression, wrap it in <nowiki> tag first. See https://www.mediawiki.org/wiki/Extension:SyntaxHighlight for details on <syntaxhighlight>, see the params and their description for changes. The name of this template comes from "SynTax HighLight".
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Content | 1 | The content to display. It will get expanded, so wrap anything that you don't want expanded in <nowiki>...</nowiki>; if you use Visual Editor, the wrapped content will appear with <nowiki> tags in the editor, but will rendered without them once saved. | Content | required |
| Force "Mediawiki" language | mw | A shorthand for "lang=mediawiki". If set, overrides "Code Language" parameter. Set to any value other than 0 to enable.
| Boolean | suggested |
| Code Language | lang | The target code language. "text" by default.
| String | suggested |
| Inline | inline i | Whether to display the generated inline code block. Disables line numbering.
| Boolean | suggested |
| Enable lines | line | Enables displaying of lines. A language must be specified for this to work. Set to 0 to disable, set to any other value to enable.
| Boolean | suggested |
| Highlight lines | highlight | A list of lines to highlight, separated by a comma, e.g., "4", "7". Ranges are also allowed: "2-5". Combined: "4, 7-14". | String | suggested |
| Starting line | start | The line to start counting from. "Enable lines" must be set for this to work. | Number | suggested |
| Class | class | Class name to use (?). Might override the default class names. | String | optional |
| Style | style | Custom CSS styles. | Content | optional |