File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -86,10 +86,10 @@ func isAbbreviation(str string) bool {
86
86
return false
87
87
}
88
88
89
- var illegalcharsRegexp = regexp .MustCompile (`[^\p{L}0-9\s&'_\(\)\-,:]` )
89
+ var illegalcharsRegexp = regexp .MustCompile (`[^\p{L}0-9\s&'_\(\)\-,:! ]` )
90
90
var spaceReplaceRegexp = regexp .MustCompile (`[\.\s_]+` )
91
91
var websiteRegexp = regexp .MustCompile (`((https?|ftp|smtp):\/\/)?(www.)[a-z0-9]+\.[a-z]+(\/[a-zA-Z0-9#]+\/?)*` )
92
- var trimRegexp = regexp .MustCompile (`^[^\p{L}0-9]*(.+?[\.\)]?)[^\p{L}0-9]*$` )
92
+ var trimRegexp = regexp .MustCompile (`^[^\p{L}0-9]*(.+?[\.\)]?)[^\p{L}0-9! ]*$` )
93
93
94
94
// CleanName returns the media name cleaned from punctuation
95
95
func CleanName (name string ) string {
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ var testMovieTitles = []string{
44
44
"10 Things I Hate About You" ,
45
45
"Berlin, I Love You" ,
46
46
"To All the Boys I've Loved Before" ,
47
+ "Mamma Mia!" ,
47
48
}
48
49
49
50
func TestCleanNameMovieTitles (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments