Content deleted Content added
Actually we can use the new range parameter for this. Which means we can stop checking the length of years from compressempty |
Testing year_to range coloring. |
||
Line 40:
end
local function color(args, year, itemNum, to_range)
if args[year .. '_color'] then
return args[year .. '_color']
end
if to_range and args[year .. '_to_' .. to_range .. '_color'] then
return args[year .. '_to_' .. to_range .. '_color']
end
Line 68 ⟶ 72:
builder = builder:tag('th')
:attr('scope', 'row')
:css('border-right', '1.4em solid ' .. color(args, year, itemNum, range))
:wikitext(range ~= 0 and year .. '–' .. range or year)
if itemNum > 1 then
|