Module:Navbox Automatic Groups: Difference between revisions

ReisuDesign (talk | contribs)
No edit summary
ReisuDesign (talk | contribs)
No edit summary
Line 47: Line 47:
end
end


-- Build DPL arguments from all non-control parameters
-- Build DPL arguments
local function getDplArgs(args, group, exclusions)
local function getDplArgs(args, group, exclusions)
local dplArgs = {}
local dplArgs = {}
local notFormat = tostring(args.not_format or '%%group%%')
for key, value in pairs(args) do
for key, value in pairs(args) do
key = tostring(key)
key = tostring(key)
Line 60: Line 62:
end
end
end
end
if #exclusions > 0 then
 
for i, exclusion in ipairs(exclusions) do
for i, exclusion in ipairs(exclusions) do
dplArgs['not' .. i] = exclusion
dplArgs['not' .. i] = substituteGroup(notFormat, exclusion)
end
end
end
return dplArgs
return dplArgs
end
end