Template:Inline-code
Revision as of 03:58, 29 June 2022 by Naginreed (talk | contribs) (Created page with "<onlyinclude><!-- -->{{#if:{{yesno|{{{nowrap|}}}}}|<templatestyles src="Template:Nowrap/styles.css"/>}}<!-- -->{{#tag:syntaxhighlight|{{{code|{{{1}}}}}}|inline=1 | id = {{{id|}}} | class = {{#if:{{yesno|{{{nowrap|}}}}}|nowrap}} {{{class|}}} | style = {{{style|}}} | lang = {{{lang|{{{2|php}}}}}} }}</onlyinclude> <noinclude> {{doc}} Category:Formatting templates </noinclude>")
{{{1}}}
Usage
- Some text, then {{Inline-code | 1=wfDebug( $text, $dest = 'all' );}} and more text.
produces
- Some text, then
wfDebug( $text, $dest = 'all' );
and more text.
Note that for PHP, using the shorter {{phpi}}
might be easier.
TemplateData
An inline source code string.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Code | 1 code | The code to display. | String | required |
Language | 2 lang | The programming language of the source code. List of valid values is at: Extension:SyntaxHighlight#Supported_languages
| String | suggested |
Class | class | no description | String | optional |
ID | id | no description | String | optional |
CSS Style | style | no description | String | optional |
The above documentation is transcluded from Template:Inline-code/doc. (edit | history)