Sandbox:User:Ritsu: Difference between revisions

Undo revision 741469 by Ritsu (talk)
No edit summary
(Undo revision 741469 by Ritsu (talk))
Tags: Replaced Undo
Line 1: Line 1:
local p = {}
{{#invoke:Test|hello}}
p.loop = function(frame)
local stage = frame.args.stage
local rows = {}
-- the actual looping part
for value in mw.text.gsplit(stage, ',') do
table.insert(rows, '|' .. value)
end
return ' {|\n' .. table.concat(rows, '\n|-\n') .. '\n|}'
end
return p