Content deleted Content added
S.A. Julio (talk | contribs) updating module code with additional features/improvements. Removing the type=NT feature, as this becomes too complex with men/women, senior/youth, past flag variants, using alternative display names, placeholders, generating match links, etc. All this is better done by using the {{fb}} series of templates |
S.A. Julio (talk | contribs) improve matching logic |
||
Line 341:
local function cleanTeam(str, defaultName)
if str and str ~= "" then
str = str:gsub('<sup.->.-</sup>', '')
str = str:gsub("</?%w+[^>]*>", "")
str = str:gsub('\127%\'"`UNIQ.-QINU`"%\'\127', '')
Line 346 ⟶ 347:
str = str:gsub("%[%[[Ii]mage:[^%]]+%]%]", "")
str = str:gsub("%[%[.-%]%]", replaceLink)
str = str:gsub("%s* %s*", "")
str = str:match("^%s*(.-)%s*$") -- Remove leading and trailing whitespace
return str ~= "" and str or defaultName
|