From: Michael Tremer Date: Fri, 26 Apr 2024 14:35:48 +0000 (+0000) Subject: wiki: Only match usernames when a word starts with @ X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09734369b737264f1bfda4f78ab3e228e49db869;p=ipfire.org.git wiki: Only match usernames when a word starts with @ Signed-off-by: Michael Tremer --- diff --git a/src/backend/wiki.py b/src/backend/wiki.py index e77a27b2..8edfb4e6 100644 --- a/src/backend/wiki.py +++ b/src/backend/wiki.py @@ -995,7 +995,7 @@ class CVELinksPreprocessor(markdown.preprocessors.Preprocessor): class UserMentionPreprocessor(markdown.preprocessors.Preprocessor): - regex = re.compile(r"@(\w+)") + regex = re.compile(r"\b@(\w+)") def run(self, lines): for line in lines: