File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ import (
1212)
1313
1414var (
15-
16- // This replaces all special characters
17- tagRegexp = regexp .MustCompile (`[^a-z0-9\-\s]` )
1815 tagRegexpSpaces = regexp .MustCompile (`[\s]+` )
1916)
2017
@@ -62,14 +59,12 @@ func pqErrMsg(err error) string {
6259// lowercasing and removing all special characters except for dashes.
6360func normalizeTags (tags []string ) []string {
6461 var (
65- out []string
66- space = []byte (" " )
67- dash = []byte ("-" )
62+ out []string
63+ dash = []byte ("-" )
6864 )
6965
7066 for _ , t := range tags {
71- rep := bytes .TrimSpace (tagRegexp .ReplaceAll (bytes .ToLower ([]byte (t )), space ))
72- rep = tagRegexpSpaces .ReplaceAll (rep , dash )
67+ rep := tagRegexpSpaces .ReplaceAll (bytes .TrimSpace ([]byte (t )), dash )
7368
7469 if len (rep ) > 0 {
7570 out = append (out , string (rep ))
You can’t perform that action at this time.
0 commit comments