Module:Sandbox/B2project/NHL Standings: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 369:
 
end -- function parseHighlightArg
 
local function parseBoldArg(boldArg, teamsToBold)
local teamList = mw.text.split(boldArg, '%s*,%s*')
if (#teamList == 0) then
return
end
for idx, team in ipairs(teamList) do
teamsToBold[mw.text.trim(team)] = true
end
end
 
 
local function parseTeamLinks(teamLinksArg, linkForTeam)
Line 450 ⟶ 438:
parseHighlightArg(frame.args.highlight, teamsToHighlight)
end
 
local teamsToBold = {}
if (frame.args.bold ~= nil) then
parseBoldArg(frame.args.bold, teamsToBold)
end
local linkForTeam = {}
if (frame.args.team_links ~= nil) then
Line 547 ⟶ 530:
teamRowInfo.rowStyle = ' style="background:#CCFFCC;font-weight:bold;"'
end
 
if (teamsToBold[teamInfo.name]) then
teamRowInfo.rowStyle = ' style="font-weight:bold;"'
end
table.insert(outputBuffer,
generateTeamRow[outputFormat](teamRowInfo, teamInfo)