From 0b192d0febc77e10cd23ce213f3f5f768fad760c Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 16 Aug 2019 15:33:34 +0100 Subject: [PATCH] count numeric OR non-alphanumeric as a word boundary --- modules/git_webhooks/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/git_webhooks/__init__.py b/modules/git_webhooks/__init__.py index 7dce8145..4b3e31ad 100644 --- a/modules/git_webhooks/__init__.py +++ b/modules/git_webhooks/__init__.py @@ -131,7 +131,7 @@ class Module(ModuleManager.BaseModule): # will fire indefininitely. continue - regex = re.compile(r"(.)\b(%s)(%s)" % ( + regex = re.compile(r"([0-9]|\W)(%s)(%s)" % ( re.escape(user.nickname[0]), re.escape(user.nickname[1:])), re.I) s = regex.sub("\\1\\2\u200c\\3", s)