from retail

This commit is contained in:
NoM0Re
2025-01-16 20:39:25 +01:00
parent fcd2d11478
commit e924932d63
5 changed files with 187 additions and 66 deletions
+11 -2
View File
@@ -4561,7 +4561,8 @@ end
function Private.CreateFormatters(input, getter, withoutColor)
local seenSymbols = {}
local formatters = {}
Private.ParseTextStr(input, function(symbol)
local parseFn = function(symbol)
if not seenSymbols[symbol] then
local _, sym = string.match(symbol, "(.+)%.(.+)")
sym = sym or symbol
@@ -4576,7 +4577,15 @@ function Private.CreateFormatters(input, getter, withoutColor)
end
end
seenSymbols[symbol] = true
end)
end
if type(input) == "string" then
Private.ParseTextStr(input, parseFn)
elseif type(input) == "table" then
for _, v in ipairs(input) do
Private.ParseTextStr(v, parseFn)
end
end
return formatters
end