Content deleted Content added
account for whitespace |
bgcolor |
||
Line 27:
if ii ~= jj then
local match_str = Args['match_' .. ti .. '_' .. tj] or ''
local bgcol_str = Args['bgcol_' .. ti .. '_' .. tj] or ''
local game_count = 1
while match_str ~= '' do
local gii = mw.ustring.match(match_str, '^%s*([^%+%s]*)%s*%+?')
local bgcolii = mw.ustring.match(bgcol_str, '^%s*([^%+%s]*)%s*%+?')
if gii == '1' then
Args['win_'..ti] = Args['win_'..ti] + 1
Line 41 ⟶ 43:
end
Args['match' .. game_count .. '_' .. ti .. '_' .. tj] = gii
if bgcolii ~= '' then
Args['bgcol' .. game_count .. '_' .. ti .. '_' .. tj] = bgcolii
end
bgcol_str = mw.ustring.gsub(bgcol_str, '^%s*([^%+%s]*)%s*%+?', '') or ''
match_str = mw.ustring.gsub(match_str, '^%s*([^%+%s]*)%s*', '') or '' -- Remove gii from the match_str
if match_str ~= '' then -- If there is still a plus sign
|