Module:Check for unknown parameters: Difference between revisions

imported>MSGJ
m +pushpin_map
 
imported>Johnuniq
implement edit request from User:Zackmann08 to remove 'coord' from default in mapframe_params table per talk permalink
 
Line 23: Line 23:


local mapframe_params = {
local mapframe_params = {
'coord',
'coordinates',
'coordinates',
'id',
'id',
Line 110: Line 109:
-- create the list of known args, regular expressions, and the return string
-- create the list of known args, regular expressions, and the return string
local knownargs = {}
local knownargs = {}
 
if isnotempty(args['mapframe_args']) then
if isnotempty(args['mapframe_args']) then
for _, v in ipairs(mapframe_params) do
for _, v in ipairs(mapframe_params) do
    knownargs[v] = 1
knownargs[v] = 1
end
end
end
end
Line 119: Line 118:
if isnotempty(args['pushpin_map_args']) then
if isnotempty(args['pushpin_map_args']) then
for _, v in ipairs(pushpin_map_params) do
for _, v in ipairs(pushpin_map_params) do
    knownargs[v] = 1
knownargs[v] = 1
end
end
end
end
 
local regexps = {}
local regexps = {}
for k, v in pairs(args) do
for k, v in pairs(args) do
Line 132: Line 131:
end
end
end
end
 
-- loop over the parent args, and make sure they are on the list
-- loop over the parent args, and make sure they are on the list
local ignoreblank = isnotempty(args['ignoreblank'])
local ignoreblank = isnotempty(args['ignoreblank'])