View source for Module:Check for deprecated parameters/sandbox
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
-- This module may be used to compare the arguments passed to the parent
-- with a list of arguments, returning a specified result if an argument is
-- on the list
local p = {}
local function trim(s)
return s:match('^%s*(.-)%s*$')
end
local function isnotempty(s)
return s and trim(s) ~= ''
end
function p.check (frame)
-- create the table of deprecated values and their matching new value
local args = frame.args
local dep_values = {}
for k, v in pairs(args) do
if k == 'ignoreblank' or k == 'preview' or k == 'deprecated' then else
dep_values[k] = v
end
end
000
1:0
Template used on this page: