Module:Variable arguments: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) m Undid revision 198236 by ArrowHead294 (talk) Tag: Undo |
||
| Line 40: | Line 40: | ||
function p.lua_banner(frame) | function p.lua_banner(frame) | ||
local args = mArguments.getArgs(frame, { | |||
parentOnly = true | |||
}) | |||
local debugg = frame.args.debug_mode or args.debug_mode | local debugg = frame.args.debug_mode or args.debug_mode | ||
local fmt = "* [[Module: %s]]\n" | local fmt = "* [[Module: %s]]\n" | ||
local namespace = string.lower(frame:preprocess("{{NAMESPACE}}")) | local namespace = string.lower(frame:preprocess("{{NAMESPACE}}")) | ||
local result = "" | local result = "" | ||
local i = | local i = 0 | ||
for k, v in pairs(args) do | |||
result = result .. (v == debugg and "" or string.format(fmt, frame:preprocess(string.format("{{ucfirst:%s}}", v)))) | |||
result = result .. string.format(fmt, frame:preprocess(string.format("{{ucfirst:%s}}", | |||
i = i + 1 | i = i + 1 | ||
end | end | ||