Editing Module:Check for unknown parameters

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. Read the Privacy Policy to learn what information we collect about you and how we use it.

If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 35: Line 35:
end
end


function p._check(args, pargs)
function p.check (frame)
if type(args) ~= "table" or type(pargs) ~= "table" then
local args = frame.args
-- TODO: error handling
local pargs = frame:getParent().args
return
end
 
local ignoreblank = isnotempty(args['ignoreblank'])
local ignoreblank = isnotempty(args['ignoreblank'])
local showblankpos = isnotempty(args['showblankpositional'])
local showblankpos = isnotempty(args['showblankpositional'])
Line 89: Line 86:
-- add results to the output tables
-- add results to the output tables
if #values > 0 then
if #values > 0 then
if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then
if frame:preprocess( "{{REVISIONID}}" ) == "" then
unknown = preview
unknown = preview
end
end
Line 105: Line 102:


return table.concat(res)
return table.concat(res)
end
function p.check(frame)
local args = frame.args
local pargs = frame:getParent().args
return p._check(args, pargs)
end
end


return p
return p
Please note that all contributions to Nonbinary Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see Nonbinary Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)

Template used on this page: