fix(katana): replace all, not just once

This commit is contained in:
tretrauit 2024-01-07 20:59:49 +07:00
parent ab6f42d5e6
commit 6d735e76cc

View File

@ -118,7 +118,9 @@ fn fix_tesseract_string(text: &mut String) {
}
// Replace "\n" with " "
trace!("Text: {}", text);
replace_string(text, "\n", " ");
while replace_string(text, "\n", " ") {
trace!("Replacing '\\n' with ' '");
}
// Remove all non-alphanumeric characters
trace!("Text: {}", text);
text.retain(|c| {