Changes
add support for start and type attributes in ordered lists
return ''
end
-- Check if we need a ul tag or an ol tag, and get the start and type attributes for ordered lists.
local listTag = 'ul'
local startAttr, typeAttr
if listType == 'numbered' then
listTag = 'ol'
startAttr = args.start
if startAttr then
startAttr = ' start="' .. startAttr .. '"'
end
typeAttr = args.type
if typeAttr then
typeAttr = ' type="' .. typeAttr .. '"'
end
end
startAttr = startAttr or ''
typeAttr = typeAttr or ''
-- Get the classes and styles and output the list.
local class = getClass(listType, args.class) or ''
list_style = list_style and (' style="' .. list_style .. '"') or ''
return mw.ustring.format(
'<div%s%s><%s%s%s%s>%s</%s></div>', class, style, listTag, startAttr, typeAttr, list_style, table.concat(listItems), listTag
)
end