Module:Check for unknown parameters: Difference between revisions
improve error message for positional
m>Frietjes (reduce REVISIONID checks per thread at https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&oldid=725747331#Preview-only_template_warnings_using_REVISIONID_magic_word) |
m>Frietjes (improve error message for positional) |
||
Line 58: | Line 58: | ||
( showblankpos or isnotempty(v) ) | ( showblankpos or isnotempty(v) ) | ||
then | then | ||
table.insert(values, k) | v = mw.ustring.gsub(v, '[^%w\-_ ]', '?') | ||
v = mw.ustring.gsub(v, '([%w\-_ ])', '%1', 25) | |||
table.insert(values, k .. ' = ' .. v) | |||
end | end | ||
end | end |