Anonymous user
Module:Message box: Difference between revisions
remove the presentButBlank function, fix bug with blank date values, and trim whitespace from all arguments
(change the smalltext logic to work with collapsible text fields) |
(remove the presentButBlank function, fix bug with blank date values, and trim whitespace from all arguments) |
||
Line 13:
local tinsert = table.insert
local tconcat = table.concat
local trim = mw.text.trim
local box = {}
Line 24 ⟶ 25:
return title
end
end▼
if type(s) ~= 'string' then return end▼
return true▼
end
end
Line 219 ⟶ 211:
self.issue = args.smalltext
else
local
if
sect = 'This ' .. (cfg.sectionDefault or 'page')
elseif type(args.sect) == 'string' then
sect = 'This ' .. sect
else▼
sect = nil▼
end
local issue = args.issue
Line 240 ⟶ 230:
-- Get the self.talk value.
local talk = args.talk
if
talk = '#'
end
Line 267 ⟶ 257:
-- Get other values.
self.fix = args.fix
self.date =
self.date = lang:formatDate('F Y')
end
Line 536 ⟶ 526:
-- assume args are being passed directly in from the debug console
-- or from another Lua module.
local
if frame == mw.getCurrentFrame() then
for k, v in pairs(frame.args) do
break
end
else
▲ end
-- Trim whitespace.
local args = {}
for k, v in pairs(origArgs) do
end
return makeBox(boxType, args)
|