Modul:Check for unknown parameters: Unterschied zwischen den Versionen
Modul:Check for unknown parameters (Quelltext anzeigen)
Version vom 17. Juni 2016, 16:14 Uhr
, vor 9 Jahreninclude non-blank positional in the default, but excluded blank positional in the default
Keine Bearbeitungszusammenfassung |
(include non-blank positional in the default, but excluded blank positional in the default) |
||
| Zeile 16: | Zeile 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_, ' | ||
| Zeile 73: | Zeile 73: | ||
addresult(k) | addresult(k) | ||
end | end | ||
elseif | elseif type(k) == 'number' and | ||
knownargs[tostring(k)] == nil and | knownargs[tostring(k)] == nil and | ||
( | ( showblankpos or isnotempty(v) ) | ||
then | then | ||
addresult(k) | addresult(k) | ||