Module:Sports results/blank

-- This module generates a blank invocation of the sports results module -- using the values of team1, team2, ...

local p = {}

local function isnotempty(s) return s and s:match( '^%s*(.-)%s*$' ) ~= '' end

function p.main(frame) local args = (frame.args['team1'] ~= nil or frame.args['team_order'] ~= nil) and frame.args or frame:getParent.args local processed = {} -- Alternative syntax for team list if args['team_order'] and args['team_order'] ~= '' then local tlist = mw.text.split(args['team_order'], '%s*[;,]%s*') for k, tname in ipairs(tlist) do			if tname ~= '' then args['team' .. k] = tname end end end -- Count the number of teams local numteams = 0 while isnotempty(args['team' .. (numteams + 1)]) do 		numteams = numteams + 1 end local res = '' return res end

return p