Module:Check for unknown parameters: Difference between revisions
clip at 25 characters
m>Frietjes (improve error message for positional) |
m>Frietjes (clip at 25 characters) |
||
Line 58: | Line 58: | ||
( showblankpos or isnotempty(v) ) | ( showblankpos or isnotempty(v) ) | ||
then | then | ||
local vlen = mw.ustring.len(v) | |||
v = mw.ustring.sub(v, 1, (vlen < 25) and vlen or 25) | |||
v = mw.ustring.gsub(v, '[^%w\-_ ]', '?') | v = mw.ustring.gsub(v, '[^%w\-_ ]', '?') | ||
table.insert(values, k .. ' = ' .. v .. ((vlen >= 25) and '..' or '')) | |||
table.insert(values, k .. ' = ' .. v) | |||
end | end | ||
end | end |