Changes
simplify the type-property-checking code
root.css('margin-left', indent .. 'em')
end
-- 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'] and not local listType = args['type'] if listType and not listType:match('^%s*[1AaIi]%s*$') then if not args['list_style_type'] and not args['list-style-type'] listStyleType then args['list_style_type'] listStyleType = args['type']listType args['type'] listType = nil
end
end
list
.attr('start', args.start)
.attr('type', args.typelistType) .css('list-style-type', args.list_style_type or args['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.
.wikitext(table.concat(listItems))