Module:Sandbox/Ahecht/flag: Difference between revisions

Content deleted Content added
debug
simplify
Line 27:
for k,v in pairs(params) do
local key = mw.ustring.rep('\t', depth) .. '["' .. k .. '"] = '
if type(k) == "string" then
key = '"' .. k .. '"'
end
if type(v) == "string" then
output[#output+1] = mw.ustring.rep('\t', depth) .. '[' .. key .. '] = "' .. v .. '"'
elseif type(v) == "table" then
local subout = p._main(v, depth+1)
output[#output+1] = mw.ustring.rep('\t', depth) .. '[' .. key .. '] = {\n' .. table.concat(subout,",\n") .. '\n' .. mw.ustring.rep('\t', depth) ..'}'
end
end