Anonymous user
Module:Arguments: Difference between revisions
fix bug where explicitly deleted args were still appearing when iterated over with pairs or ipairs - code courtesy of User:Jackmcbarn
(allow using both the frame and parent frame arguments with the wrappers option if specifically requested, per protected edit request by User:Jackmcbarn) |
(fix bug where explicitly deleted args were still appearing when iterated over with pairs or ipairs - code courtesy of User:Jackmcbarn) |
||
Line 170:
-- into one table using the specified iterator. If a value is already
-- present it is not overwritten; tables listed earlier have precedence.
-- We are also memoizing nil values,
--
--]]
for _, t in ipairs(tables) do
for key, val in iterator(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] =
else
metaArgs[key] = tidiedVal
Line 219:
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal
nilArgs[key] = true▼
metaArgs[key] = argTableVal
return argTableVal
end
end
return nil
end
Line 255 ⟶ 254:
--]]
metaArgs[key] = nil
nilArgs[key] =
else
metaArgs[key] = val
|