Module:Sandbox: Difference between revisions
Jump to navigation
Jump to search
(Replaced content with "---------------------------------------------------------------------------------------------------- -- -- Module:Sandbox -- -- Here you can set anything you want in this sandbox, as long as it uses the language Lua. -- Do not forget to add {{#invoke:Sandbox|<function name>}} in your template. -- Category:Sandbox -- ---------------------------------------------------------------------------------------------------- local p...") Tag: Replaced |
mNo edit summary Tag: Reverted |
||
Line 11: | Line 11: | ||
local p = {} | local p = {} | ||
function p.main( | function p.main(args) | ||
local output = '{| class="wikitable"\n' | |||
output = output .. '! Column 1 !! Column 2\n' | |||
for i, item in ipairs(args) do | |||
output = output .. '|-\n| ' .. item .. ' || ' .. i .. '\n' | |||
local output = | |||
output = output .. | |||
for | |||
output = output .. | |||
end | end | ||
output = output .. '|}\n' | |||
output = output .. | |||
return output | return output | ||
end | end | ||
return p | return p |
Revision as of 21:52, 24 March 2023
----------------------------------------------------------------------------------------------------
--
-- Module:Sandbox
--
-- Here you can set anything you want in this sandbox, as long as it uses the language Lua.
-- Do not forget to add {{#invoke:Sandbox|<function name>}} in your template.
-- [[Category:Sandbox]]
--
----------------------------------------------------------------------------------------------------
local p = {}
function p.main(args)
local output = '{| class="wikitable"\n'
output = output .. '! Column 1 !! Column 2\n'
for i, item in ipairs(args) do
output = output .. '|-\n| ' .. item .. ' || ' .. i .. '\n'
end
output = output .. '|}\n'
return output
end
return p