fix(katana/parser): remove -PRINT] part from name

fk calf
This commit is contained in:
tretrauit 2024-01-31 23:34:53 +07:00
parent 07acc53e07
commit 1a68d9b177
2 changed files with 5 additions and 1 deletions

View File

@ -147,7 +147,7 @@ async fn query_characters_regex_internal(
characters.push(None)
}
}
}
}
}
Err(e) => {
error!("Failed to get cursor: {}", e);

View File

@ -311,6 +311,10 @@ pub fn parse_cards_from_calf_analysis(content: &String) -> Vec<Character> {
None => {}
}
name_string.remove_matches("**");
let open_square_bracket = name_string.rfind('[');
if name_string.contains("-PRINT]") && open_square_bracket.is_some() {
name_string.drain((open_square_bracket.unwrap() - 1)..);
}
name_string
}
None => continue,