Content deleted Content added
debug |
Fix "ongoing" tests |
||
Line 11:
local function _row(frame, rargs)
local rtype = mw.ustring.lower(rargs.type or '')
local ongoing = rargs.ongoing == 'yes'
local output = {'|-'}
setmetatable(output, {__call = function (t, v) t[#t+1] = v end }) -- Append to array by calling it
Line 37 ⟶ 38:
end
output('|- class="sr-only"')
if
rtype == "parliamentary" or rtype == "legislative"
) and (
Line 82 ⟶ 83:
),
suppressplaceholder = 'yes',
class = notblank(rargs['pageimage' .. i]) and '' or 'notpageimage noresize'
}
} )
Line 112 ⟶ 113:
threeCells('running_mate')
-- Electoral vote --
if not ongoing then
threeCells('electoral_vote', (rargs.college_voted == 'no' and 'Projected e' or 'E') .. 'lectoral vote')
end
end
-- Delegate count --
threeCells('delegate_count', (
--
-- Contests won
threeCells('states_carried', 'Contests won')
-- Presidential not ongoing --
elseif not ongoing then
-- States carried --
threeCells('states_carried', 'States carried')
end
end
-- Parliamentary or legislative --
Line 128 ⟶ 138:
threeCells('last_election')
-- Seats before --
threeCells('seats_before',
-- Ongoing --
if
-- Seats needed --
threeCells('seats_needed')
Line 144 ⟶ 154:
end
-- Primary or not ongoing --
if
-- Popular vote --
threeCells('popular_vote', (rargs.vote_type or 'Popular') .. ' vote')
Line 160 ⟶ 170:
threeCells('counties_won')
-- Counties 25% threshold --
threeCells('
end
end
-- Swing --
if (rtype == 'parliamentary' or rtype == 'legislative') and
threeCells('swing')
end
|