local p = {}
local function getArgNums(args)
-- Get the keys of the numerical arguments that are present.
local nums = {}
local tinsert = table.insert
for k, v in pairs(args) do
if type(k) == 'number' then
tinsert(nums, k)
end
end
table.sort(nums)
return nums
end
local function makeToolbarItems(args)
local nums = getArgNums(args)
local sep = (args.separator or 'pipe') .. '-separator'
sep = mw.message.new(sep):plain()
local ret = {}
local tinsert = table.insert
for i, v in ipairs(nums) do