ထႅမ်းပလဵတ်ႉ:code
{{{2}}}
- ၽိုၼ်ၵႅမ်မိုဝ်း ဢၼ်ၼႆႉၼႆႉ မီးဝႆႉတီႈ ထႅမ်းပလဵတ်ႉ:code/documentation ဢေႃႈ။ [မႄးထတ်း]
- ႁဵင်းၵွင်ႉ ၸိူဝ်းတေၶဝ်ႈတင်းတိုဝ်း: သဵၼ်ႈမၢႆ ၼႃႈလိၵ်ႈၽႄ • လွင်ႈသႂ်ႇထုတ်ႇဢဝ် • ၸိူဝ်းၶိုၼ်းၸီႉၼႄ
This is a convenience template, which formats a short inline snippet of code with syntax highlighting of a given language. The language is specified in |1=
(the first positional parameter), while |2=
(the second positional parameter) is the snippet to format. If the snippet contains an equal sign, precede it with =
.
Typical values for |1=
:
text
or omitted: Raw text. This simply applies a monospaced font, similarly to surrounding the snipped with<code>...</code>
.lua
: Lua code.js
orjavascript
: JavaScript code.py
orpython
: Python code.
The possible values are those understood by the <syntaxhighlight>
tag.
It is similar to Wikipedia's w:Template:code, but the argument order is opposite.
တူဝ်ယၢင်ႇ[မႄးထတ်း]
{{code||foo("bar")}}
renders asfoo("bar")
.{{code|js|=(65535).toString(16) === 'ffff'}}
renders as(65535).toString(16) === 'ffff'
.
တူၺ်းပႃး[မႄးထတ်း]
{{temp}}
{{kbd}}
{{lua}}
{{syntaxhighlight}}