summaryrefslogtreecommitdiffstats
path: root/activities/models
diff options
context:
space:
mode:
authorAndrew Godwin2022-11-21 22:17:22 -0700
committerAndrew Godwin2022-11-21 22:17:22 -0700
commit63ab492439ce4711fe6370d63bc6a55a48121448 (patch)
treee0c8434447982e63feef3df1c5cdc6a8244cd883 /activities/models
parent1d37dce0123d5746603e88678997edb562d61691 (diff)
downloadtakahe-63ab492439ce4711fe6370d63bc6a55a48121448.tar.gz
takahe-63ab492439ce4711fe6370d63bc6a55a48121448.tar.bz2
takahe-63ab492439ce4711fe6370d63bc6a55a48121448.zip
Fix mentions at the start of posts
Diffstat (limited to 'activities/models')
-rw-r--r--activities/models/post.py2
1 files changed, 1 insertions, 1 deletions
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):