summaryrefslogtreecommitdiffstats
path: root/webapp/components/suggestion/at_mention_provider.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/suggestion/at_mention_provider.jsx')
-rw-r--r--webapp/components/suggestion/at_mention_provider.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/webapp/components/suggestion/at_mention_provider.jsx b/webapp/components/suggestion/at_mention_provider.jsx
index 6118b8d98..f1b36d697 100644
--- a/webapp/components/suggestion/at_mention_provider.jsx
+++ b/webapp/components/suggestion/at_mention_provider.jsx
@@ -15,6 +15,7 @@ import {Constants, ActionTypes} from 'utils/constants.jsx';
import React from 'react';
import {FormattedMessage} from 'react-intl';
+import XRegExp from 'xregexp';
class AtMentionSuggestion extends Suggestion {
render() {
@@ -124,7 +125,7 @@ export default class AtMentionProvider {
handlePretextChanged(suggestionId, pretext) {
const hadSuggestions = this.clearTimeout(this.timeoutId);
- const captured = (/(?:^|\W)@([a-z0-9\-._]*)$/i).exec(pretext.toLowerCase());
+ const captured = XRegExp.cache('(?:^|\\W)@([\\pL\\d\\-_.]*)$', 'i').exec(pretext.toLowerCase());
if (captured) {
const prefix = captured[1];