Template:Inline-code
<syntaxhighlight inline="1" id="" class="" style="" lang="php">{{{1}}}</syntaxhighlight>
Usage
- Some text, then {{Inline-code | 1=wfDebug( $text, $dest = 'all' );}} and more text.
produces
- Some text, then <syntaxhighlight inline="1" id="" class="" style="" lang="php">wfDebug( $text, $dest = 'all' );</syntaxhighlight> and more text.
Note that for PHP, using the shorter {{phpi}} might be easier.
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools.
Inline-code
<templatedata> { "description": "An inline source code string.", "format": "inline", "params": { "1": { "aliases": ["code"], "label": "Code", "description": "The code to display.", "required": true, "type": "string" }, "2": { "aliases": ["lang"], "label": "Language", "description": "The programming language of the source code. List of valid values is at: Extension:SyntaxHighlight#Supported_languages", "default": "php", "example": "sql", "suggested": true, "type": "string" }, "class": { "label": "Class", "type": "string" }, "id": { "label": "ID", "type": "string" }, "style": { "label": "CSS Style", "type": "string" } } } </templatedata>
See also
- {{code}}