کاربر ناشناس
پودمان:Check for unknown parameters: تفاوت میان نسخهها
Added entry point for modules per talk page discussion. Report any errors on talk page.
جز (۱ نسخه واردشده) |
(Added entry point for modules per talk page discussion. Report any errors on talk page.) |
||
خط ۳۵: | خط ۳۵: | ||
end | end | ||
function p. | function p._check(args, pargs) | ||
if type(args) ~= "table" or type(pargs) ~= "table" then | |||
-- TODO: error handling | |||
return | |||
end | |||
local ignoreblank = isnotempty(args['ignoreblank']) | local ignoreblank = isnotempty(args['ignoreblank']) | ||
local showblankpos = isnotempty(args['showblankpositional']) | local showblankpos = isnotempty(args['showblankpositional']) | ||
خط ۸۶: | خط ۸۹: | ||
-- add results to the output tables | -- add results to the output tables | ||
if #values > 0 then | if #values > 0 then | ||
if | if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then | ||
unknown = preview | unknown = preview | ||
end | end | ||
خط ۱۰۲: | خط ۱۰۵: | ||
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 |