ထာမ်ပလိက်:lua
code
- ပွမဗက်လိက်စၟတ်သမ္တီမချူလဝ်နကဵုခၞံဗဒှ်အပ္ဍဲ ထာမ်ပလိက်:lua/documentation ။ [edit]
- လေန်မရပ်စပ်သုၚ်စောဲ: စရၚ်မုက်လိက်ဂၠေံဂၠေံ • လေန်ဂမၠိုၚ် • မပြံၚ်လှာဲဂၠံၚ်ဍာဲဂမၠိုၚ် • ပရေၚ်မပံၚ်စပ်ဂမၠိုၚ် • မဗၠေတ်ဗၠေၚ်ဂမၠိုၚ် (မပါ်ပ္တိတ်တၞဟ်ခြာပိုဒ်/မဝ်ဂျူ) • ကဠာသံၚ်ဗ္တဳ
This template is used to wrap and add syntax highlighting to Lua code snippets, for use in documentation pages. Examples:
1. A simple example:
{{lua|"foo bar"}}
produces
"foo bar"
2. A more complex example:
{{lua|1={spec = "gender/number_spec", qualifiers = nil or {"qualifier1", "qualifier2", ...} }}
produces
{spec = "gender/number_spec", qualifiers = nil or {"qualifier1", "qualifier2", ...}
Note in the latter case, the param |1=
needs to be explicitly given to avoid the equal signs in the code snippet from being interpreted as specifying named parameters, and a space is used at the end of the snippet to avoid parser problems with three braces in a row.
See also
ပလေဝ်ဒါန်{{uses lua}}
– a box for templates that use Lua