Módulo:Football box collapsible teamname

Revisão em 00h55min de 14 de maio de 2024 por Jaewoo (discussão | contribs) (Criou a página com "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...")
(dif) ← Revisão anterior | Revisão atual (dif) | Revisão seguinte → (dif)

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;