fix: exclude dash and underscore for decancer

This commit is contained in:
Palm 2022-09-08 06:59:40 +07:00 committed by GitHub
parent a75d6e8692
commit 8af95f03bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ pub async fn cure(
let mut cured_name = DECANCER let mut cured_name = DECANCER
.cure(&name) .cure(&name)
.replace(|c: char| !(c == ' ' || c.is_ascii_alphanumeric()), ""); .replace(|c: char| !(c == ' ' || c == '-' || c == '_' || c.is_ascii_alphanumeric()), "");
if cured_name.is_empty() { if cured_name.is_empty() {
cured_name = "ReVanced user".to_string(); cured_name = "ReVanced user".to_string();