䀡碼源𧵑模庉:Check for unknown parameters
交面
伴空得權𢯢𢷮張尼、爲理由𢖖󠄁:
伴吻固体䀡吧抄劄碼源𧵑張尼。
-- 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
-- not 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)
local args = frame.args
local pargs = frame:getParent().args
local ignoreblank = isnotempty(frame.args['ignoreblank'])
local showblankpos = isnotempty(frame.args['showblankpositional'])
local knownargs = {}
local unknown = frame.args['unknown'] or 'Found _VALUE_, '
local preview = frame.args['preview']
000
1:0
板㑄用𥪝張尼: