Module:List: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
fix ordered lists - had a stupid variable clash
(simplify the type-property-checking code)
(fix ordered lists - had a stupid variable clash)
Line 69:
-- Detect if the type attribute specified by args.type is using an invalid value, and if so try passing it as a list-style-type CSS property.
local listStyleType = args.list_style_type or args['list-style-type']
local listTypetypeAttr = args['type']
if listTypetypeAttr and not listTypetypeAttr:match('^%s*[1AaIi]%s*$') then
if not listStyleType then
listStyleType = listTypetypeAttr
listTypetypeAttr = nil
end
end
Line 80:
list
.attr('start', args.start)
.attr('type', listTypetypeAttr)
.css('list-style-type', listStyleType)
.cssText(args.list_style or args.ul_style or args.ol_style) -- ul_style and ol_style are included for backwards compatibility. No distinction is made for ordered or unordered lists.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu