Skip to content

Commit 8c7d578

Browse files
Fix colour codes leaking into formated numbers (#6072)
1 parent 819a42d commit 8c7d578

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Modules/Common.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ end
592592
function formatNumSep(str)
593593
return string.gsub(str, "(%^?x?%x?%x?%x?%x?%x?%x?-?%d+%.?%d+)", function(m)
594594
local colour = m:match("(^x%x%x%x%x%x%x)") or m:match("(%^%d)") or ""
595-
local str = m:gsub("(^x%x%x%x%x%x%x)", "") or m:gsub("(%^%d)", "")
595+
local str = m:gsub("(^x%x%x%x%x%x%x)", ""):gsub("(%^%d)", "")
596596
if str == "" or (colour == "" and m:match("%^")) then -- return if we have an invalid color code or a completely stripped number.
597597
return m
598598
end

0 commit comments

Comments
 (0)