diff options
author | Wim <wim@42.be> | 2016-06-23 20:28:05 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2016-06-23 20:28:05 +0200 |
commit | 6ec77e06eaecc9b0567e1c67e9255da448fa4b2f (patch) | |
tree | 9520a787e4b8bbc582fc1fddbf8bedd810f8bd6c /vendor/github.com/mattermost/platform/model/utils.go | |
parent | e48db67649118bb2c77acfedc9320b45db9fd4ea (diff) | |
download | matterbridge-msglm-6ec77e06eaecc9b0567e1c67e9255da448fa4b2f.tar.gz matterbridge-msglm-6ec77e06eaecc9b0567e1c67e9255da448fa4b2f.tar.bz2 matterbridge-msglm-6ec77e06eaecc9b0567e1c67e9255da448fa4b2f.zip |
Sync with mattermost 3.1.0
Diffstat (limited to 'vendor/github.com/mattermost/platform/model/utils.go')
-rw-r--r-- | vendor/github.com/mattermost/platform/model/utils.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vendor/github.com/mattermost/platform/model/utils.go b/vendor/github.com/mattermost/platform/model/utils.go index 443a34bc..27093c09 100644 --- a/vendor/github.com/mattermost/platform/model/utils.go +++ b/vendor/github.com/mattermost/platform/model/utils.go @@ -315,10 +315,9 @@ 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 puncStart = regexp.MustCompile(`^[^\pL\d\s#]+`) var hashtagStart = regexp.MustCompile(`^#{2,}`) -var puncEnd = regexp.MustCompile(`[.,()&$#!\?\[\]{}':;\\<>\-+=%^*|]+$`) -var puncEndWildcard = regexp.MustCompile(`[.,()&$#!\?\[\]{}':;\\<>\-+=%^|]+$`) +var puncEnd = regexp.MustCompile(`[^\pL\d\s]+$`) func ParseHashtags(text string) (string, string) { words := strings.Fields(text) |