From d75d465f0a1df473e90239cbd352bcd1e8c687f0 Mon Sep 17 00:00:00 2001 From: ionite34 Date: Tue, 20 Dec 2022 17:53:03 +0800 Subject: Improve RE_ANSI match cases --- bot/exts/utils/snekbox/_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/utils/snekbox/_io.py b/bot/exts/utils/snekbox/_io.py index 88f10e4a2..faa7d3bb3 100644 --- a/bot/exts/utils/snekbox/_io.py +++ b/bot/exts/utils/snekbox/_io.py @@ -18,7 +18,7 @@ FILE_COUNT_LIMIT = 10 # ANSI escape sequences -RE_ANSI = regex.compile(r"\x1b[^m]*m") +RE_ANSI = regex.compile(r"\\u.*\[(.*?)m") # Characters with a leading backslash RE_BACKSLASH = regex.compile(r"\\.") # Discord disallowed file name characters -- cgit v1.2.3