mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-22 16:46:28 +01:00
Merge pull request #356 from rakoo/dot-mention
Don't highlight mention when it's prepended by a dot
This commit is contained in:
commit
aefbfd59e5
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ function countableText(inputText) {
|
||||||
// https://github.com/mastodon/mastodon/blob/c03bd2a238741a012aa4b98dc4902d6cf948ab63/app/models/account.rb#L69
|
// 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 USERNAME_RE = /[a-z0-9_]+([a-z0-9_.-]+[a-z0-9_]+)?/i;
|
||||||
const MENTION_RE = new RegExp(
|
const MENTION_RE = new RegExp(
|
||||||
`(^|[^=\\/\\w])(@${USERNAME_RE.source}(?:@[\\p{L}\\w.-]+[\\w]+)?)`,
|
`(^|[^=\\/\\w.])(@${USERNAME_RE.source}(?:@[\\p{L}\\w.-]+[\\w]+)?)`,
|
||||||
'uig',
|
'uig',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue