From 69c47489e3d5b80d08bd25a19ee67eaf430e4dbd Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Fri, 15 Mar 2024 18:20:45 +0800 Subject: [PATCH] Fix some at-mentions not handled --- src/utils/handle-content-links.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/handle-content-links.js b/src/utils/handle-content-links.js index be6547f..f1bf712 100644 --- a/src/utils/handle-content-links.js +++ b/src/utils/handle-content-links.js @@ -16,7 +16,9 @@ function handleContentLinks(opts) { const textBeforeLinkIsAt = prevText?.endsWith('@'); const textStartsWithAt = target.innerText.startsWith('@'); if ( - (target.classList.contains('u-url') && textStartsWithAt) || + ((target.classList.contains('u-url') || + target.classList.contains('mention')) && + textStartsWithAt) || (textBeforeLinkIsAt && !textStartsWithAt) ) { const targetText = (