Template:Lua: Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens (Added support for line numbers.) |
ObsidianPLG (talk | contribs) (hopefully this will fix the <lua> bugs??) |
||
Line 1: | Line 1: | ||
<onlyinclude> | <onlyinclude><syntaxhighlight lang="lua" line>{{{1}}}</syntaxhighlight></onlyinclude>{{documentation}} |
Revision as of 18:22, 18 April 2023
{{{1}}}
This is a documentation subpage for Template:Lua.
It contains usage information, categories and other content that is not part of the original template page.
This template allows you to have syntax highlighting with a tab width of 4 to present Lua code.
Usage
{{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
- [empty or 1]
- The code itself.
- linenumbers
- Whether line numbers should be shown.
Examples
Example
Code
{{Lua|= for i = 1, 5 do print("Hello World!") end }}
Result
{{{1}}}