From ac60890c9a7b36bb003b1d1ea319dc8aadfc50e5 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 17 Dec 2023 17:52:56 +0800 Subject: [PATCH] Revert "Don't highlight mention when it's prepended by a dot" This reverts commit 5fef0b3fb5a530921ca0c3d895f8b2b4b0fea70c. --- src/components/compose.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/compose.jsx b/src/components/compose.jsx index 49537832..93dd027f 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -108,7 +108,7 @@ function countableText(inputText) { // https://github.com/mastodon/mastodon/blob/c03bd2a238741a012aa4b98dc4902d6cf948ab63/app/models/account.rb#L69 const USERNAME_RE = /[a-z0-9_]+([a-z0-9_.-]+[a-z0-9_]+)?/i; const MENTION_RE = new RegExp( - `(^|[^=\\/\\w.])(@${USERNAME_RE.source}(?:@[\\p{L}\\w.-]+[\\w]+)?)`, + `(^|[^=\\/\\w])(@${USERNAME_RE.source}(?:@[\\p{L}\\w.-]+[\\w]+)?)`, 'uig', );