feat: regex matching

This commit is contained in:
iff 2023-08-01 19:35:22 +02:00
parent a5762bf121
commit 3e367a09dd
8 changed files with 85 additions and 93 deletions

View file

@ -55,9 +55,9 @@ fn gen_string_hashmap(rules: Vec<Rule>) -> String {
.map(|x| x.to_lowercase())
.collect::<Vec<String>>();
string_hashmap.push_str(&format!(
"(vec![\"{}\"], vec![\"{}\"]),",
"(vec![\"{}\"], vec![r###\"{}\"###]),",
pattern.join("\", \""),
suggest.join("\", \"")
suggest.join("\"###, r###\"")
));
}
string_hashmap.push_str("]),");