Module:Sandbox/Jackmcbarn

This is an old revision of this page, as edited by Jackmcbarn (talk | contribs) at 21:14, 2 June 2014 (for converting map). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}

function p.main(frame)
	local argsToReturn = {}
	local extra = {}
	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]))
		frame.args[v] = nil
	end
	if mw.text.trim(frame.args[1]) == 'Syria' then frame.args[1] = nil end
	for k,v in pairs(frame.args) do
		table.insert(extra, 'EXTRA ' .. k .. ' = ' .. v)
	end
	return '{ ' .. table.concat(argsToReturn, ', ') .. ' }' .. table.concat(extra, ', ')
end

return p