summaryrefslogtreecommitdiffstats
path: root/web/react/utils/text_formatting.jsx
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-09-22 14:28:43 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-09-22 14:28:43 -0400
commitd025da5da9b6b6bf3c0003191f07a8184e545f8a (patch)
treeb0165c660f34ffc47a3049dbaa6196d000d2d7dd /web/react/utils/text_formatting.jsx
parent1709532ae6f48df0c152afb6a58597cd07d6df49 (diff)
downloadchat-d025da5da9b6b6bf3c0003191f07a8184e545f8a.tar.gz
chat-d025da5da9b6b6bf3c0003191f07a8184e545f8a.tar.bz2
chat-d025da5da9b6b6bf3c0003191f07a8184e545f8a.zip
Changed hashtag regex to only accept hashtags that begin with a letter
Diffstat (limited to 'web/react/utils/text_formatting.jsx')
-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 940bd0485..089fdd4f9 100644
--- a/web/react/utils/text_formatting.jsx
+++ b/web/react/utils/text_formatting.jsx
@@ -247,7 +247,7 @@ function autolinkHashtags(text, tokens) {
return prefix + alias;
}
- return output.replace(/(^|\W)(#[a-zA-Z0-9.\-_]+)\b/g, replaceHashtagWithToken);
+ return output.replace(/(^|\W)(#[a-zA-Z][a-zA-Z0-9.\-_]*)\b/g, replaceHashtagWithToken);
}
function highlightSearchTerm(text, tokens, searchTerm) {