Template:Lua

{{{}}}
[purge]Template-info.png Template documentation
This template allows you to have syntax highlighting with a tab width of 4 to present Lua code.

Usage[edit]

{{lua|[=]code[|linenumbers=true]}}

Note: text between brackets ([ and ]) is optional, text in bold represents a certain value (something you must replace) and the rest represents things that must be present as-is.

Parameters[edit]

[empty or 1]
The code itself.
linenumbers
Whether line numbers should be shown.

Examples[edit]

Example[edit]

Code[edit]

<code>
{{lua|=
for i = 1, 5 do
	print("Hello World!")
end
}}
</code>

Result[edit]

for i = 1, 5 do
	print("Hello World!")
end