Module:NBA team standings: Difference between revisions

Content deleted Content added
m Changed protection settings for "Module:NBA team standings": High-risk template or module ([Edit=Require extended confirmed access] (indefinite))
Changed: – → ‍–‍ for home & road records to prevent line breaks
 
(3 intermediate revisions by one other user not shown)
Line 44:
 
local function winpct(w, l)
local pct = '–'
if (w + l) > 0 then
returnpct = rnd(w / (w + l), 23):gsub('^0', '')
end
return '–'pct
end
 
Line 66 ⟶ 67:
local division = args['division']:lower()
-- division leader record
local dloffset = 8*((tonumber(args[division .. 'leader']) or 1) - 1)
local dlhw = tonumber(args[dloffset + 3])
local dlhl = tonumber(args[dloffset + 4])
Line 124 ⟶ 125:
row:tag('td'):wikitext(gbformat(hw, hl, rw, rl, dlhw, dlhl, dlrw, dlrl))
-- home record
row:tag('td'):wikitext(hw .. '‍–‍' .. hl)
-- road record
row:tag('td'):wikitext(rw .. '‍–‍' .. rl)
-- div record
row:tag('td'):wikitext(divrecord)