summaryrefslogtreecommitdiffstats
path: root/model/utils.go
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-10-17 14:37:51 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-10-19 13:25:19 -0400
commit06fd374c1907add3faeeba7916b279e0a3302a4e (patch)
tree278094fd30b875ed431467e7505294edf1852e56 /model/utils.go
parent754f1721fe77b3f842277d1c72e25e83cf993133 (diff)
downloadchat-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.go4
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 := ""