Content deleted Content added
add missing rowscope scenario |
+ |
||
(16 intermediate revisions by 2 users not shown) | |||
Line 263:
-- build the table
local root = mw.html.create(args['embed'] and '' or 'table')
if args['embed'] == nil and args['floatright'] then
root
:addClass('wikitable sortable floatright')
:tag('caption')
:wikitext(args.caption)
:done()
elseif args['embed'] == nil then
root
:addClass('wikitable sortable')
Line 340 ⟶ 346:
:attr('rowspan', rowspan)
:attr('colspan', 2)
if headings['vp'] then
row
:tag('th')
:wikitext('Running mate')
:attr('scope', 'col')
:attr('rowspan', rowspan)
:done()
cols = cols + 1
end
row
:tag('th')
Line 367 ⟶ 382:
cols = cols + 1
end
if headings['vp'] and not has_alliance then
row
:tag('th')
Line 697 ⟶ 712:
row
:tag('td')
:attr('rowspan', args['candspan' .. v] or args['aspan' .. v])
:wikitext(args['vp' .. v])
end
Line 721 ⟶ 737:
:wikitext(args['alliance' .. v])
end
if args['alliance' .. v] and args['party' .. v] and not has_cand then
row
:tag('td')
:attr('rowspan', args['aspan' .. v])
:attr('scope', 'row')
:wikitext(args['alliance' .. v])
elseif args['alliance' .. v] and args['party' .. v] and args.dsv then
row
:tag('td')
:attr('rowspan', args['aspan' .. v])
:attr('scope', 'row')
:wikitext(args['alliance' .. v])
elseif args['alliance' .. v] and args['party' .. v] then
row
:tag('td')
:attr('rowspan', args['aspan' .. v])
:wikitext(args['alliance' .. v])
end
if args['party' .. v] and not has_alliance
row
:tag('td')
:attr('scope', 'row')
:wikitext(args['party' .. v])
elseif args['party' .. v] and not has_cand and not has_alliance then
row
:tag('td')
:attr('scope', 'row')
:wikitext(args['party' .. v])
elseif args['party' .. v] and not has_alliance or args['cand' .. v] and has_party and not has_alliance then
row
:tag('td')
Line 738 ⟶ 775:
:tag('td')
:attr('colspan', cs)
:attr('scope', 'row')
:wikitext(args['row' .. v])
end
Line 758 ⟶ 796:
:tag('td')
:attr('colspan', 2)
:attr('scope', 'row')
:wikitext('Total')
end
Line 764 ⟶ 803:
:css('font-style', 'italic')
:tag('td')
:attr('scope', 'row')
:wikitext('Total')
end
Line 771 ⟶ 811:
:tag('td')
:attr('colspan', 3)
:attr('scope', 'row')
:wikitext('Total')
end
|