跳转到内容

模板:Inline-code

来自天灾之下:危险连接资料站

{{{1}}}

模板文档

Usage

Simply wraps {{{code}}} in <syntaxhighlight inline lang="php">{{{code}}}</syntaxhighlight>,
where in {{Inline-code }}: |lang=php is by default, but |lang= can be whatever, e.g. sql, wikitext, etc. (check Extension:SyntaxHighlight for list of languages available).

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

This is the TemplateData documentation for this template used by VisualEditor and other tools.

Inline-code

An inline source code string.

模板参数[编辑模板数据]

此模板首选参数不换行的行内格式。

参数描述类型状态
Code1 code

The code to display.

字符串必需
Language2 lang

The programming language of the source code. List of valid values is at: Extension:SyntaxHighlight#Supported languages.

默认值
php
示例值
sql
字符串推荐
Classclass

无描述

字符串可选
IDid

无描述

字符串可选
CSS stylestyle

无描述

字符串可选

See also