diff options
author | 2022-12-20 17:53:03 +0800 | |
---|---|---|
committer | 2022-12-20 17:53:03 +0800 | |
commit | d75d465f0a1df473e90239cbd352bcd1e8c687f0 (patch) | |
tree | df712f2f4d24e78830b0205f29ccbeee62280267 | |
parent | Add discord file name normalization (diff) |
Improve RE_ANSI match cases
-rw-r--r-- | bot/exts/utils/snekbox/_io.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |