Module:Sandbox/Ahecht/flag: Difference between revisions

Content deleted Content added
debug
remove unneeded function
 
(13 intermediate revisions by the same user not shown)
Line 1:
local p = {}
function p.main(frame)
if ( (frame.args.alias or "") ~= "" ) then
output = {}
for k,v in pairs(frame.args) do
if (v or '') ~= '' then
output[#output+1] = '\t["' .. k .. '"] = ' .. v
end
end
for k,v in pairs(frame:getParent().args) do
if (v or '') ~= '' then
output[#output+1] = '\t["' .. k .. '"] = ' .. v
end
end
return '["' .. frame.args.alias .. '"] = {\n' .. table.concat(output,",\n") .. '\n},\n'
else
return ""
end
end
 
return p