Modulo:TeamBracket/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
fix |
fix errore nella chiamata a gsub |
||
(2 versioni intermedie di uno stesso utente non sono mostrate) | |||
Riga 21:
local RD1seedmap = {}
local tcats = ''
local function isnotblank(s)
Line 67 ⟶ 65:
end
return 0
end
local function unboldParenthetical(s)
if s then
s = mw.ustring.gsub(s, '(%(%[%[[^%[%]]*%]%]%))', '<span style="font-weight:normal">%1</span>')
end
return s
end
Line 99 ⟶ 104:
k = mw.ustring.gsub(k, '^' .. rdstr .. '(%-[a-z][a-z]*)4', '3rd%12')
elseif k:find('^Consol') then
k = mw.ustring.gsub(k, '^Consol
tcats = tcats .. '[[Categoria:Errori nella compilazione di TeamBracket|3]]'
elseif k:find('^group[0-9]') then
Line 356 ⟶ 361:
if isblank(teamArg) then
teamArg = ' '
elseif boldwinner ~= '' then
teamArg = unboldParenthetical(teamArg)
end
Line 394 ⟶ 401:
or nil
end
if (score1 == nil or score1 == '') and (score2 == nil or score2 == '') then
if hideomittedscores > 0 and s >= hideomittedscores then
teamcolspan = teamcolspan + 1
Line 736 ⟶ 743:
for i = (count+1), (offsetcount + offsetThird) do
if (rounds > 1) then
if compact and (rounds > 2) then
blank = addBlank(i, nil, 1, tonumber(hideSeeds and '3' or '4') + legs[
end
▲ blank = addBlank(i, nil, 1, tonumber(hideSeeds and '3' or '4') + legs[rounds-1])
end
end
Line 774 ⟶ 780:
seedCell = widthRow:tag('td'):css('width', getWidth('seed', '28px'))
end
local teamCell = widthRow:tag('td'):css('width', getWidth('team', '
local scoreCells = {}
local legsr = legs[r]
if compactFinal and r == (maxround-1) then
legsr = legs[r+1] > legs[r] and legs[r+1] or legs[r]
end
if showThird and r==maxround then
legsr = legs[r+1] > legs[r] and legs[r+1] or legs[r]
end
for s = 1, legsr do
local score_width = '30px'
scoreCells[s] = widthRow:tag('td'):css('width', getWidth('score', '28px'))▼
if aggregate and aggregate ~= '' and s > 1 and s == legsr then
score_width = getWidth('agg', getWidth('score', score_width))
else
score_width = getWidth('score', score_width)
end
end
titleRow:tag('td')
|