Module:MLB standings: Difference between revisions

Content deleted Content added
fix bugs
fix expansion of template
Line 16:
end
end
-- everything up to here should be removed once mw.text becomes avaulable.
 
local function readTeamInfo(args, currentIdx)
Line 37 ⟶ 36:
 
function me.generateStandingsTable(frame)
local year = mw.text.trim(frame.args.year)
year = mw.text.trim(year)
local division = mw.text.trim(frame.args.division)
 
Line 63 ⟶ 61:
 
table.insert(outputSeq,
frame:expandTemplate{ title = 'navbar', args = {
'{{navbar|' .. year .. ' ' .. division .. ' standings|mini=1}}\',
{| class="wikitable" width="60%" style="text-align:center;"\
mini = 1,
}} .. '\n'
)
table.insert(outputSeq,
'{| class="wikitable" width="60%" style="text-align:center;"\
! width="38%" | ' .. division .. '\
! width="7%" | [[Win (baseball)|W]]\
Line 71 ⟶ 74:
! width="7%" | [[Games behind|GB]]\
! width="9%" | [[Home (sports)|Home]]\
! width="9%" | [[Road (sports)|Road]]\n
'
)