From 69697666641d60fd816adb2e7329c857d68ebe25 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Thu, 24 Aug 2023 02:54:59 -0400 Subject: [PATCH] fix: ignore regex u flag It's needed for certain regex patterns in JS, and we can just silently ignore it. --- cli/src/generate/parse_grammar.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/generate/parse_grammar.rs b/cli/src/generate/parse_grammar.rs index 88bd57c1..e8eca095 100644 --- a/cli/src/generate/parse_grammar.rs +++ b/cli/src/generate/parse_grammar.rs @@ -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()