summaryrefslogtreecommitdiffstats
path: root/web/react/utils
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-11-04 09:57:02 -0500
committerhmhealey <harrisonmhealey@gmail.com>2015-11-04 09:57:02 -0500
commitf0823ba5d808086929274fe2f5f055264215f0f3 (patch)
treeaddb217ac6da6196695423eeed04dbc292fa619a /web/react/utils
parent1a4584f3dafbc2a81d44d667776cfa47fada7eaa (diff)
downloadchat-f0823ba5d808086929274fe2f5f055264215f0f3.tar.gz
chat-f0823ba5d808086929274fe2f5f055264215f0f3.tar.bz2
chat-f0823ba5d808086929274fe2f5f055264215f0f3.zip
Allowed @mentions to follow any non-alphanumeric character instead of just whitespace
Diffstat (limited to 'web/react/utils')
-rw-r--r--web/react/utils/text_formatting.jsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/react/utils/text_formatting.jsx b/web/react/utils/text_formatting.jsx
index c354941f7..4d4849281 100644
--- a/web/react/utils/text_formatting.jsx
+++ b/web/react/utils/text_formatting.jsx
@@ -166,7 +166,7 @@ function autolinkAtMentions(text, tokens) {
}
let output = text;
- output = output.replace(/(^|\s)(@([a-z0-9.\-_]*))/gi, replaceAtMentionWithToken);
+ output = output.replace(/(^|[^a-z0-9])(@([a-z0-9.\-_]*))/gi, replaceAtMentionWithToken);
return output;
}