summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authornickago <ngonella@calpoly.edu>2015-06-30 11:56:55 -0700
committernickago <ngonella@calpoly.edu>2015-06-30 11:57:57 -0700
commitbcc31b714b19ff3817c96c801028e23ace8cc55b (patch)
tree9ca11d12039146bec180fd5a0c1ac2c4974da5e1 /model
parent7a7be75e742603d06927a488b136e1ed4432aac2 (diff)
downloadchat-bcc31b714b19ff3817c96c801028e23ace8cc55b.tar.gz
chat-bcc31b714b19ff3817c96c801028e23ace8cc55b.tar.bz2
chat-bcc31b714b19ff3817c96c801028e23ace8cc55b.zip
Added the ability to have hashtags with dashes in them
Diffstat (limited to 'model')
-rw-r--r--model/utils.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/model/utils.go b/model/utils.go
index cc51dfe47..50e427694 100644
--- a/model/utils.go
+++ b/model/utils.go
@@ -260,7 +260,7 @@ func Etag(parts ...interface{}) string {
return etag
}
-var validHashtag = regexp.MustCompile(`^(#[A-Za-z]+[A-Za-z0-9_]*[A-Za-z0-9])$`)
+var validHashtag = regexp.MustCompile(`^(#[A-Za-z]+[A-Za-z0-9_\-]*[A-Za-z0-9])$`)
var puncStart = regexp.MustCompile(`^[.,()&$!\[\]{}"':;\\]+`)
var puncEnd = regexp.MustCompile(`[.,()&$#!\[\]{}"':;\\]+$`)