Skip to content

Commit

Permalink
Merge pull request #356 from rakoo/dot-mention
Browse files Browse the repository at this point in the history
Don't highlight mention when it's prepended by a dot
  • Loading branch information
cheeaun committed Dec 13, 2023
2 parents f213a8e + 5fef0b3 commit aefbfd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/compose.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);

Expand Down

0 comments on commit aefbfd5

Please sign in to comment.