diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-09-22 14:28:43 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-09-22 14:28:43 -0400 |
commit | d025da5da9b6b6bf3c0003191f07a8184e545f8a (patch) | |
tree | b0165c660f34ffc47a3049dbaa6196d000d2d7dd /web | |
parent | 1709532ae6f48df0c152afb6a58597cd07d6df49 (diff) | |
download | chat-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')
-rw-r--r-- | web/react/utils/text_formatting.jsx | 2 |
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) { |