편집 요약 없음
편집 요약 없음 |
편집 요약 없음 |
||
429번째 줄: | 429번째 줄: | ||
function p.navbox(frame) | function p.navbox(frame) | ||
-- ParserFunctions considers the empty string to be false, so to preserve the previous | |||
-- behavior of {{navbox}}, change any empty arguments to nil, so Lua will consider | |||
-- them false too. | |||
args = | local args = {} | ||
local parent_args = frame:getParent().args; | |||
-- | -- Out of order parsing bug. | ||
local | local temp; | ||
temp = parent_args.title; | |||
temp = parent_args.above; | |||
for i = 1, 20 do | for i = 1, 20 do | ||
temp = parent_args["group" .. tostring(i)]; | |||
temp = parent_args["list" .. tostring(i)]; | |||
end | end | ||
temp = parent_args.below; | |||
for k, v in pairs(parent_args) do | |||
if v ~= '' then | |||
args[k] = v | |||
end | |||
end | |||
return p._navbox(args) | return p._navbox(args) | ||
end | end | ||
return p | return p |