Skip to content

Commit d378220

Browse files
committed
Remove more characters from names
1 parent b7e2769 commit d378220

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sanitize.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ func RenameTrack(file string) string {
5555

5656
// Sanitize takes a string and removes problematic characters from it.
5757
func Sanitize(s string) string {
58+
s = unidecode.Unidecode(s)
5859
s = strings.Map(func(r rune) rune {
59-
if r == '(' || r == ')' || r == '[' || r == ']' || r == '.' {
60+
if r == '(' || r == ')' || r == '[' || r == ']' || r == '.' || r == ',' || r == '\'' || r == '"' || r == ';' {
6061
return -1
6162
}
6263
if unicode.IsSpace(r) {
6364
return '_'
6465
}
6566
return r
6667
}, s)
67-
s = unidecode.Unidecode(s)
6868
return s
6969
}

0 commit comments

Comments
 (0)