Module:Check for unknown parameters: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
update to allow check for unnamed parameters, code by User:Frietjes
(use preview warning rather than not-hatnote hatnote)
(update to allow check for unnamed parameters, code by User:Frietjes)
Line 69:
table.insert(values, clean(k))
end
elseif type(k) == 'number' and knownargs[tostring(k)] == nil then
local knownflag = false
knownargs[tostring(k)] == nil and
for _, regexp in ipairs(regexps) do
( showblankpos or isnotempty(v) )
if mw.ustring.match(tostring(k), regexp) then
then
knownflag = true
table.insert(values, k .. ' = ' .. clean(v))
break
end
end
if not knownflag and ( showblankpos or isnotempty(v) ) then
table.insert(values, k .. ' = ' .. clean(v))
end
end
end
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu