Module:Check for unknown parameters: Difference between revisions
no edit summary
m>Frietjes (disable ignoreblank in preview) |
m>Frietjes No edit summary |
||
Line 27: | Line 27: | ||
local ispreview = frame:preprocess( "{{REVISIONID}}" ) == "" and 1 or 0 | local ispreview = frame:preprocess( "{{REVISIONID}}" ) == "" and 1 or 0 | ||
-- create the list of known args, regular expressions, and the return string | -- create the list of known args, regular expressions, and the return string | ||
Line 69: | Line 68: | ||
end | end | ||
end | end | ||
if not knownflag and ( not ignoreblank | if (not knownflag) and ispreview or ( (not ignoreblank) and (not isnotempty(v)) ) then | ||
k = mw.ustring.gsub(k, '[^%w\-_ ]', '?') | k = mw.ustring.gsub(k, '[^%w\-_ ]', '?') | ||
addresult(k) | addresult(k) |