From 63ab492439ce4711fe6370d63bc6a55a48121448 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Mon, 21 Nov 2022 22:17:22 -0700 Subject: Fix mentions at the start of posts --- activities/models/post.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activities') diff --git a/activities/models/post.py b/activities/models/post.py index da23742..378de91 100644 --- a/activities/models/post.py +++ b/activities/models/post.py @@ -166,7 +166,7 @@ class Post(StatorModel): ### Content cleanup and extraction ### mention_regex = re.compile( - r"([^\w\d\-_])@([\w\d\-_]+(?:@[\w\d\-_]+\.[\w\d\-_\.]+)?)" + r"(^|[^\w\d\-_])@([\w\d\-_]+(?:@[\w\d\-_]+\.[\w\d\-_\.]+)?)" ) def linkify_mentions(self, content, local=False): -- cgit v1.2.3