From e3d6eef990c03fd054651a67092931e292f95305 Mon Sep 17 00:00:00 2001 From: Stathis Xantinidis Date: Mon, 8 Jun 2026 09:18:59 +0300 Subject: [PATCH] fix: use raw string for glitter regex pattern Replace the regex pattern string with a raw string and remove unnecessary escaping of '*' in the character class. This eliminates the warning emitted by newer python versions: SyntaxWarning: "\*" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\*"? The regex behavior is unchanged. --- python/glitter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/glitter.py b/python/glitter.py index b2c84b6b..4df4b806 100644 --- a/python/glitter.py +++ b/python/glitter.py @@ -9,7 +9,7 @@ if weechat.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENSE, SCRIPT_DESC, "", ""): weechat.hook_command_run("/input return", "command_run_input", "") -glitter_pat = re.compile("\*\*\*([^\*]+)\*\*\*") +glitter_pat = re.compile(r"\*\*\*([^*]+)\*\*\*") def glitter_it(match): lut = ("13","4","8","9","11","12") # len=6 text = match.group(1)