fix: ignore regex u flag

It's needed for certain regex patterns in JS, and we can just silently ignore it.
This commit is contained in:
Amaan Qureshi 2023-08-24 02:54:59 -04:00 committed by Andrew Hlynskyi
parent 04b6c20f11
commit 6969766664

View file

@ -150,10 +150,10 @@ fn parse_rule(json: RuleJSON) -> Rule {
f.chars()
.filter(|c| {
if *c != 'i' {
eprintln!("Warning: unsupported flag {}", c);
eprintln!("Warning: unsupported flag {c}");
false
} else {
true
*c != 'u' // silently ignore unicode flag
}
})
.collect()