Template:Lua: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens
I might be wrong, but if I remember well, the default tab size in the studio is 3, so I believe we should just use that size.
nvm broke it, rolling it back
Tag: Manual revert
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div style="-moz-tab-size:3;-o-tab-size:3;-webkit-tab-size:3; tab-size:3;">{{#tag:code|{{{1|{{{}}}}}}|lua="lua"}}</div>
<onlyinclude>{{Code|=|{{{1|{{{}}}}}}|lang=lua|linenumbers={{{linenumbers|}}}}}</onlyinclude>{{documentation}}

Latest revision as of 22:23, 18 April 2023

{{{}}}
[purge] Template documentation

Documentation subpage icon

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

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