Changes
remove the presentButBlank function, fix bug with blank date values, and trim whitespace from all arguments
local tinsert = table.insert
local tconcat = table.concat
local trim = mw.text.trim
local box = {}
return title
end
end
end
self.issue = args.smalltext
else
local sect = args.sect if presentButBlank(args.sect) == '' then
sect = 'This ' .. (cfg.sectionDefault or 'page')
elseif type(args.sect) == 'string' then
sect = 'This ' .. sect
end
local issue = args.issue
-- Get the self.talk value.
local talk = args.talk
if presentButBlank(talk) == '' and self.isTemplatePage then
talk = '#'
end
-- Get other values.
self.fix = args.fix
self.date = lang:formatDate('F Y')
end
-- assume args are being passed directly in from the debug console
-- or from another Lua module.
local argsorigArgs
if frame == mw.getCurrentFrame() then
for k, v in pairs(frame.args) do
break
end
else
origArgs = frame end -- Trim whitespace. local args = {} for k, v in pairs(origArgs) do if type(v) == 'string' then v = trim(v) end args [k] = framev
end
return makeBox(boxType, args)