fix(katana): lower short string & append last character
This commit is contained in:
parent
b4888c1d72
commit
4274e8539a
@ -195,6 +195,7 @@ pub fn regexify_text(text: &String) -> String {
|
|||||||
}
|
}
|
||||||
// Filter for short string.
|
// Filter for short string.
|
||||||
if short_text && !ascii_text.contains(|c: char| c.is_whitespace()) {
|
if short_text && !ascii_text.contains(|c: char| c.is_whitespace()) {
|
||||||
|
ascii_text = ascii_text.to_lowercase();
|
||||||
regex.push_str("^");
|
regex.push_str("^");
|
||||||
let mut request_quantifier: bool = false;
|
let mut request_quantifier: bool = false;
|
||||||
let mut regex_any: bool = false;
|
let mut regex_any: bool = false;
|
||||||
@ -210,6 +211,7 @@ pub fn regexify_text(text: &String) -> String {
|
|||||||
continue;
|
continue;
|
||||||
} else if i == ascii_text.len() - 1 {
|
} else if i == ascii_text.len() - 1 {
|
||||||
regex.push_str(".*");
|
regex.push_str(".*");
|
||||||
|
regex.push(char);
|
||||||
}
|
}
|
||||||
if regex_any {
|
if regex_any {
|
||||||
if char == ']' {
|
if char == ']' {
|
||||||
|
Loading…
Reference in New Issue
Block a user