Don't highlight mention when it's prepended by a dot

pull/356/head
Matthieu Rakotojaona 2023-12-12 19:18:56 +01:00
rodzic f213a8e094
commit 5fef0b3fb5
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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',
);