變更
無編輯摘要
-- Require necessary modules.
-- Require necessary modules.
local getArgs = require('Module:Arguments').getArgs
local htmlBuilder = require('Module:HtmlBuilder')
local htmlBuilder = require('Module:HtmlBuilder')
local categoryHandler = require('Module:Category handler').main
local categoryHandler = require('Module:Category handler').main
local trim = mw.text.trim
local trim = mw.text.trim
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function getTitleObject(page, ...)
local function getTitleObject(page, ...)
table.sort(nums)
table.sort(nums)
return nums
return nums
end
--------------------------------------------------------------------------------
-- Box class definition
--------------------------------------------------------------------------------
local box = {}
box.__index = box
function box.new()
local obj = {}
setmetatable(obj, box)
return obj
end
end
if self.isSmall then
if self.isSmall then
self:addClass(cfg.smallClass or 'mbox-small')
self:addClass(cfg.smallClass or 'mbox-small')
end
if yesno(args.hidden) then
self:addClass('infobox editsection')
end
end
self:addClass(self.typeClass)
self:addClass(self.typeClass)
local function main(boxType, args)
local function main(boxType, args)
box:setTitle(args)
local outputBox = box.new()
local cfg = box:getConfig(boxType)
outputBox:setTitle(args)
args = box:removeBlankArgs(cfg, args)
local cfg = outputBox:getConfig(boxType)
args = outputBox:removeBlankArgs(cfg, args)
return box:export()
outputBox:setBoxParameters(cfg, args)
return outputBox:export()
end
end
local function makeWrapper(boxType)
local function makeWrapper(boxType)
return function (frame)
return function (frame)
local args = getArgs(frame, {trim = false, removeBlanks = false})
return main(boxType, args)
return main(boxType, args)
end
end