Don't linkify mentions inside links

This commit is contained in:
Andrew Godwin 2022-12-19 00:27:05 +00:00
parent 5844b8c18c
commit 48174d84a4

View file

@ -321,7 +321,7 @@ class Post(StatorModel):
PostTypeData.parse_obj(value)
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: str, local: bool = False) -> str: