Module:Citation/CS1: Difference between revisions
don't categorize empty unnamed parameters
m>Dragons flight (sync to sandbox, adds parameter whitelist) |
m>Dragons flight (don't categorize empty unnamed parameters) |
||
Line 1,387: | Line 1,387: | ||
if v:match("%S+") ~= nil then | if v:match("%S+") ~= nil then | ||
table.insert( z.message_tail, 'Unnamed parameter containing "' .. v .. '" ignored' ); | table.insert( z.message_tail, 'Unnamed parameter containing "' .. v .. '" ignored' ); | ||
table.insert( z.error_categories, 'Pages with citations using unsupported parameters' ); | |||
end | end | ||
elseif validate( k:lower() ) then | elseif validate( k:lower() ) then | ||
table.insert( z.message_tail, 'Unknown parameter "' .. k .. '=" ignored (suggest "' .. k:lower() .. '=")' ); | table.insert( z.message_tail, 'Unknown parameter "' .. k .. '=" ignored (suggest "' .. k:lower() .. '=")' ); | ||
table.insert( z.error_categories, 'Pages with citations using unsupported parameters' ); | |||
else | else | ||
table.insert( z.message_tail, 'Unknown parameter "' .. k .. '=" ignored' ); | table.insert( z.message_tail, 'Unknown parameter "' .. k .. '=" ignored' ); | ||
table.insert( z.error_categories, 'Pages with citations using unsupported parameters' ); | |||
end | end | ||
end | end | ||
args[k] = v; | args[k] = v; |