Content deleted Content added
Jackmcbarn (talk | contribs) handle nils |
Jackmcbarn (talk | contribs) get ready for use |
||
Line 1:
local p = {}
function p.
local argsToReturn = {}
local extra = {}
local args = {}
for k,v in pairs({'lat', 'long', 'mark', 'marksize', 'label', 'link', 'label_size', 'position'}) do▼
argsToReturn[k] = string.format("%s = %q", v, mw.text.trim(frame.args[v]))▼
end
▲ frame.args[v] = nil
▲ for k,v in
if args[v] then
args[v] = nil
end
end
if
for k,v in pairs(
table.insert(extra, 'EXTRA ' .. k .. ' = ' .. v)
end
if #extra > 0 then
return '{ ' .. table.concat(argsToReturn, ', ') .. ' }' .. table.concat(extra, ', ')▼
error(table.concat(extra, ', '))
end
end
|