Anonymous user
Module:Check for unknown parameters: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Module:Check for unknown parameters (view source)
Revision as of 10:50, November 2, 2015
, 8 years agofix substitution of "_VALUE_" when it isn't followed by a space
(fix odd bug for | = which gets stripped to nothing, and Category:Foo is broken) |
(fix substitution of "_VALUE_" when it isn't followed by a space) |
||
Line 33:
end
end
end
local function addresult(k)
if k == '' then
-- Fix odd bug for | = which gets stripped to the empty string and
-- breaks category links
k = ' '
end
end
Line 46 ⟶ 57:
if( (not knownflag) and ( (not ignoreblank) or (ignoreblank and isnotempty(v)) ) ) then
k = mw.ustring.gsub(k, '[^%w\-_ ]', '?')
addresult(k)
▲ local r = mw.ustring.gsub(unknown, '_VALUE_ ', k)
▲ table.insert(res, r)
▲ table.insert(comments, '"' .. k .. '"')
end
elseif(checkpos and type(k) == 'number' and knownargs[tostring(k)] == nil) then
if( (not ignoreblank) or (ignoreblank and isnotempty(v)) ) then
addresult(k)
end
end
|