Difference between revisions of "Module:List"

Jump to navigation Jump to search
97 bytes added ,  03:27, 14 November 2013
add support for horizontal numbered lists
meta>Mr. Stradivarius
(add support for start and type attributes in ordered lists)
meta>Mr. Stradivarius
(add support for horizontal numbered lists)
Line 40: Line 40:
local function getClass(listType, class)
local function getClass(listType, class)
local classes = {}
local classes = {}
if listType == 'horizontal' then
if listType == 'horizontal' or listType == 'horizontal_numbered' then
table.insert(classes, 'hlist')
table.insert(classes, 'hlist')
elseif listType == 'unbulleted' then
elseif listType == 'unbulleted' then
Line 86: Line 86:
local listTag = 'ul'
local listTag = 'ul'
local startAttr, typeAttr
local startAttr, typeAttr
if listType == 'numbered' then
if listType == 'numbered' or listType == 'horizontal_numbered' then
listTag = 'ol'
listTag = 'ol'
startAttr = args.start
startAttr = args.start
Line 133: Line 133:
end
end


local funcNames = {'bulleted', 'unbulleted', 'horizontal', 'numbered'}
local funcNames = {'bulleted', 'unbulleted', 'horizontal', 'numbered', 'horizontal_numbered'}


for _, funcName in ipairs(funcNames) do
for _, funcName in ipairs(funcNames) do
Anonymous user

Navigation menu