fix: user link detection

This commit is contained in:
Xylight committed 2024-08-21 20:19:15 -07:00
1 parent 25b5b49f9b
commit 01c1528b8b
1 file changed
+2 -2
@@ -124,8 +124,8 @@ export const photonify = (link: string) => {
if (!match) return if (!match) return
// Same as above for the community. // Same as above for the community.
if (match?.[3].includes('@')) return `/c/${match?.[3]}` if (match?.[3].includes('@')) return `/u/${match?.[3]}`
else return `/c/${match?.[3]}@${match?.[1]}` else return `/u/${match?.[3]}@${match?.[1]}`
} }
// Support implicit user syntax (no preceding @), by messing with mailto links. // Support implicit user syntax (no preceding @), by messing with mailto links.
if (regexes.implicitUser.test(link)) { if (regexes.implicitUser.test(link)) {