Module:Check for unknown parameters: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
(use preview warning rather than not-hatnote hatnote) |
(update to allow check for unnamed parameters, code by User:Frietjes) |
||
Line 69: | Line 69: | ||
table.insert(values, clean(k)) |
table.insert(values, clean(k)) |
||
end |
end |
||
elseif type(k) == 'number' and |
elseif type(k) == 'number' and knownargs[tostring(k)] == nil then |
||
local knownflag = false |
|||
knownargs[tostring(k)] == nil and |
|||
for _, regexp in ipairs(regexps) do |
|||
⚫ | |||
if mw.ustring.match(tostring(k), regexp) then |
|||
then |
|||
knownflag = true |
|||
⚫ | |||
break |
|||
end |
|||
end |
|||
⚫ | |||
⚫ | |||
end |
|||
end |
end |
||
end |
end |