Module:Check for unknown parameters: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
No edit summary |
(include non-blank positional in the default, but excluded blank positional in the default) |
||
Line 16: | Line 16: | ||
local pargs = frame:getParent().args |
local pargs = frame:getParent().args |
||
local ignoreblank = isnotempty(frame.args['ignoreblank']) |
local ignoreblank = isnotempty(frame.args['ignoreblank']) |
||
local |
local showblankpos = isnotempty(frame.args['showblankpositional']) |
||
local knownargs = {} |
local knownargs = {} |
||
local unknown = frame.args['unknown'] or 'Found _VALUE_, ' |
local unknown = frame.args['unknown'] or 'Found _VALUE_, ' |
||
Line 73: | Line 73: | ||
addresult(k) |
addresult(k) |
||
end |
end |
||
elseif |
elseif type(k) == 'number' and |
||
type(k) == 'number' and |
|||
knownargs[tostring(k)] == nil and |
knownargs[tostring(k)] == nil and |
||
( |
( showblankpos or isnotempty(v) ) |
||
then |
then |
||
addresult(k) |
addresult(k) |