fix(katana): remove the last character if it's a -
This commit is contained in:
parent
4b14ee7c90
commit
d5be81f786
@ -4,3 +4,4 @@ members = [
|
|||||||
"swordfish-common",
|
"swordfish-common",
|
||||||
"swordfish"
|
"swordfish"
|
||||||
]
|
]
|
||||||
|
default-members = ["swordfish"]
|
||||||
|
@ -130,6 +130,10 @@ fn fix_tesseract_string(text: &mut String) {
|
|||||||
while replace_string(text, " ", " ") {
|
while replace_string(text, " ", " ") {
|
||||||
trace!("Removing multiple spaces");
|
trace!("Removing multiple spaces");
|
||||||
}
|
}
|
||||||
|
// Remove the last character if it is a dash
|
||||||
|
if text.ends_with("-") {
|
||||||
|
text.pop();
|
||||||
|
}
|
||||||
// Workaround if the first character is a space
|
// Workaround if the first character is a space
|
||||||
trace!("Text: {}", text);
|
trace!("Text: {}", text);
|
||||||
while text.starts_with(" ") {
|
while text.starts_with(" ") {
|
||||||
|
Loading…
Reference in New Issue
Block a user