Anonymous user
Module:Check for unknown parameters: Difference between revisions
Module:Check for unknown parameters (view source)
Revision as of 05:24, February 21, 2022
, 2 years agoChanged protection settings for "Module:Check for unknown parameters": Highly visible template; requested at WP:RfPP ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
Johnrdorazio (talk | contribs) m (1 revision imported) |
m (Changed protection settings for "Module:Check for unknown parameters": Highly visible template; requested at WP:RfPP ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))) |
||
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 | |||
( showblankpos or isnotempty(v) ) | for _, regexp in ipairs(regexps) do | ||
if mw.ustring.match(tostring(k), regexp) then | |||
knownflag = true | |||
break | |||
end | |||
end | |||
if not knownflag and ( showblankpos or isnotempty(v) ) then | |||
table.insert(values, k .. ' = ' .. clean(v)) | |||
end | |||
end | end | ||
end | end |