]> git.ipfire.org Git - ipfire.org.git/commitdiff
wiki: Only match usernames when a word starts with @ master
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Apr 2024 14:35:48 +0000 (14:35 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Apr 2024 14:35:48 +0000 (14:35 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/wiki.py

index e77a27b24cb4f7738232d1acc8484be785c2cbbb..8edfb4e6a1f3fb2f46062fb2a8e0a5bb8bfbc143 100644 (file)
@@ -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: