Module:Check for unknown parameters: Difference between revisions
no edit summary
m>Frietjes |
m>Frietjes No edit summary |
||
Line 19: | Line 19: | ||
local knownargs = {} | local knownargs = {} | ||
local unknown = frame.args['unknown'] or 'Found _VALUE_, ' | local unknown = frame.args['unknown'] or 'Found _VALUE_, ' | ||
local preview = frame.args['preview'] | local preview = frame.args['preview'] | ||
local res = {} | local res = {} | ||
Line 37: | Line 37: | ||
end | end | ||
end | end | ||
if isnotempty( | if isnotempty(preview) then | ||
preview = '<div class="hatnote" style="color:red"><strong>Warning:</strong> ' .. frame.args['preview'] .. ' (this message is shown only in preview).</div>' | preview = '<div class="hatnote" style="color:red"><strong>Warning:</strong> ' .. frame.args['preview'] .. ' (this message is shown only in preview).</div>' | ||
elseif | elseif preview == nil then | ||
preview = unknown | preview = unknown | ||
end | end |