Módulo:Football box collapsible teamname

Fonte: Enciclopédia de conhecimento da Igreja de Deus
Saltar para a navegação Saltar para a pesquisa

A documentação para este módulo pode ser criada na página Módulo:Football box collapsible teamname/doc

local i = {};
function i.TeamName(frame)
				local prefix = "";
				local suffix = "";
				local team = frame.args["team"] or "";
				
				if mw.ustring.sub(team,1,3) ~= "'''" and mw.ustring.sub(team,-3) ~= "'''" then
								prefix = "'''" .. '<span class="fn org">';
								suffix = "</span>'''";
				else
								if mw.ustring.sub(team,1,3) == "'''" then
												prefix = '<span class="fn org">';
												team = mw.ustring.sub(team,4);
								else
												prefix = '<span class="fn org">' .. "'''";
								end
								if mw.ustring.sub(team,-3) == "'''" then
												suffix = "</span>";
												team = mw.ustring.sub(team,1,mw.ustring.len(team)-3);
								else
												suffix = "'''</span>";
								end
				end
								
				return prefix .. team .. suffix;
end
return i;