summaryrefslogtreecommitdiff
path: root/src/text/parse/elements/mention.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/text/parse/elements/mention.ts')
-rw-r--r--src/text/parse/elements/mention.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/text/parse/elements/mention.ts b/src/text/parse/elements/mention.ts
index 4f2997b39f..2ad2788300 100644
--- a/src/text/parse/elements/mention.ts
+++ b/src/text/parse/elements/mention.ts
@@ -4,7 +4,7 @@
import parseAcct from '../../../acct/parse';
module.exports = text => {
- const match = text.match(/^(?:@[a-zA-Z0-9\-]+){1,2}/);
+ const match = text.match(/^@[a-z0-9_]+(?:@[a-z0-9\.\-]+[a-z0-9])?/i);
if (!match) return null;
const mention = match[0];
const { username, host } = parseAcct(mention.substr(1));