From 872e551157f7fc594a2429c2cfd3005692d60188 Mon Sep 17 00:00:00 2001 From: tretrauit Date: Mon, 8 Jan 2024 00:00:56 +0700 Subject: [PATCH] fix(katana): Il -> II at the end of the string --- swordfish/src/katana.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/swordfish/src/katana.rs b/swordfish/src/katana.rs index 0115e6b..a1a7385 100644 --- a/swordfish/src/katana.rs +++ b/swordfish/src/katana.rs @@ -139,6 +139,13 @@ fn fix_tesseract_string(text: &mut String) { // Fix "lll" -> "!!!" trace!("Text: {}", text); replace_string(text, "lll", "!!!"); + // Fix "Il" -> "II" in the end of the string + trace!("Text: {}", text); + if text.ends_with("Il") { + text.pop(); + text.pop(); + text.push_str("II"); + } // Replace multiple spaces with one space trace!("Text: {}", text); while replace_string(text, " ", " ") {