actually fixed it

This commit is contained in:
vel 2021-07-13 12:51:57 -07:00
parent 363f0967a3
commit 014e974499
Signed by: velvox
GPG Key ID: 1C8200C1D689CEF5
1 changed files with 9 additions and 7 deletions

16
util.go
View File

@ -40,7 +40,7 @@ func EnsureNumbers(in string) string {
}
return str
}
return ""
return in
}
// EnsureLetters
@ -53,13 +53,15 @@ func EnsureLetters(in string) string {
return ""
}
str, err := reg.Replace(in, "", 0, 0)
if err != nil {
log.Errorf("Unable to replace text in EnsureLetters")
return ""
if ok, _ := reg.MatchString(in); ok {
str, err := reg.Replace(in, "", -1, -1)
if err != nil {
log.Errorf("Unable to replace text in EnsureLetters")
return ""
}
return str
}
return str
return in
}
// CleanId