diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-10-17 14:37:51 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-10-19 13:25:19 -0400 |
commit | 06fd374c1907add3faeeba7916b279e0a3302a4e (patch) | |
tree | 278094fd30b875ed431467e7505294edf1852e56 /model/utils.go | |
parent | 754f1721fe77b3f842277d1c72e25e83cf993133 (diff) | |
download | chat-06fd374c1907add3faeeba7916b279e0a3302a4e.tar.gz chat-06fd374c1907add3faeeba7916b279e0a3302a4e.tar.bz2 chat-06fd374c1907add3faeeba7916b279e0a3302a4e.zip |
Added from:, in:, and channel: search modifiers
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 := "" |