diff options
author | Joram Wilander <jwawilander@gmail.com> | 2015-10-20 08:00:21 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2015-10-20 08:00:21 -0400 |
commit | 460a82878a93ef040d2c9a1221992ed7aa808d86 (patch) | |
tree | 1a50fabf167714d614d58b1625813b34686d5fd5 /model/utils.go | |
parent | 7d8e08ccf6211d3df78eb6cfd4a198df77072540 (diff) | |
parent | 995c5a276bb27f50332047684b4d8f4cfc02243b (diff) | |
download | chat-460a82878a93ef040d2c9a1221992ed7aa808d86.tar.gz chat-460a82878a93ef040d2c9a1221992ed7aa808d86.tar.bz2 chat-460a82878a93ef040d2c9a1221992ed7aa808d86.zip |
Merge pull request #1113 from hmhealey/plt716
PLT-716/717 Added from:, in:, and channel: search filters
Diffstat (limited to 'model/utils.go')
-rw-r--r-- | model/utils.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/model/utils.go b/model/utils.go index 269144afc..bb0669df7 100644 --- a/model/utils.go +++ b/model/utils.go @@ -242,10 +242,10 @@ func Etag(parts ...interface{}) string { var validHashtag = regexp.MustCompile(`^(#[A-Za-z]+[A-Za-z0-9_\-]*[A-Za-z0-9])$`) var puncStart = regexp.MustCompile(`^[.,()&$!\[\]{}"':;\\]+`) -var puncEnd = regexp.MustCompile(`[.,()&$#!\[\]{}"':;\\]+$`) +var puncEnd = regexp.MustCompile(`[.,()&$#!\[\]{}"';\\]+$`) func ParseHashtags(text string) (string, string) { - words := strings.Split(strings.Replace(text, "\n", " ", -1), " ") + words := strings.Fields(text) hashtagString := "" plainString := "" |