Fix some at-mentions not handled

This commit is contained in:
Lim Chee Aun 2024-03-15 18:20:45 +08:00
parent 861ad83423
commit 69c47489e3

View file

@ -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 = (