Module:List: Difference between revisions
From Mariopedia, a wiki on Mario, Yoshi, Wario, Donkey Kong, Super Smash Bros., and more!
Jump to navigationJump to search
Content deleted Content added
first attempt to add support for list-style-type, but broken for now |
convert to Module:HtmlBuilder and fix list-style-type support |
||
Line 3:
local p = {}
local htmlBuilder = require('Module:HtmlBuilder')
local function getListItem(data, style, itemStyle)
Line 8 ⟶ 10:
return nil
end
local item = htmlBuilder.create('li')
item
.cssText(style)
.wikitext(data)
return tostring(item)
▲ style, itemStyle, data
end▼
end
Line 37 ⟶ 32:
table.sort(nums)
return nums
if listType == 'horizontal' or listType == 'horizontal_ordered' then▼
elseif listType == 'unbulleted' then▼
table.insert(classes, 'plainlist')▼
if listType == 'horizontal' or listType == 'horizontal_ordered' then▼
local indent = args.indent and tonumber(indent)▼
local listStyleType = args['list-style-type']▼
table.insert(styles, args.style)▼
end
Line 88 ⟶ 50:
return ''
end
-- Build the list html.
local
▲ if listType == 'horizontal' or listType == 'horizontal_ordered' then
root.addClass('hlist')
if listType == 'ordered' or listType == 'horizontal_ordered' then▼
▲ elseif listType == 'unbulleted' then
startAttr = args.start▼
▲ end
root.addClass(args.class)
▲ if listType == 'horizontal' or listType == 'horizontal_ordered' then
end
▲
list
.attr('type', args.type)
.wikitext(table.concat(listItems))
return tostring(root)
end
|