Module:Sandbox

-- This is a sandbox for testing lua scripts. -- See Extension:Scribunto for more information.

local p = {} function p.f(frame) local r='' local t={} for n,v in frame:argumentPairs do table.insert (t,{n,v}) end local tplname tplargs = {} for n,v in pairs(t) do    r=r..n..v[1]..v[2]..'\n\n' if n~=1 then tplargs[v[1]]=v[2] else tplname=v[2] end end r=r..tplname r=r..tplargs[1] table.remove (tplargs,1) r = r .. frame:expandTemplate{title = tplname, args = tplargs} return r end return p