Module:Election results-STV: Difference between revisions

Content deleted Content added
There is a large amount of code duplication written in this module which makes it more complicated to debug. Consider using for loops and smaller functions to reduce the size of the code
+
 
(One intermediate revision by the same user not shown)
Line 333:
row
:tag('th')
:wikitext(args.firstround or 'First count')
:attr('colspan', 2)
Line 348:
row
:tag('th')
:wikitext(args.secondround or 'Second count')
:attr('colspan', 2)
end
Line 354:
row
:tag('th')
:wikitext(args.thirdround or 'Third count')
:attr('colspan', 2)
end
Line 360:
row
:tag('th')
:wikitext(args.fourthround or 'Fourth count')
:attr('colspan', 2)
end
Line 366:
row
:tag('th')
:wikitext(args.fifthround or 'Fifth count')
:attr('colspan', 2)
end
Line 372:
row
:tag('th')
:wikitext(args.sixthround or 'Sixth count')
:attr('colspan', 2)
end
Line 717:
:tag('td')
:attr('colspan', 3)
:wikitext(args['row' .. v])
end
if args['row' .. v] and not has_party then
row
:css('background-color', rcolor)
:tag('td')
:wikitext(args['row' .. v])
end