From 17e50c4c577b19418425a4e28d8f82dfff5c8e29 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Sun, 10 Mar 2024 09:47:57 -0400 Subject: [PATCH] fix: allow the regex `v` flag --- cli/src/generate/parse_grammar.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cli/src/generate/parse_grammar.rs b/cli/src/generate/parse_grammar.rs index fe863276..5a52b346 100644 --- a/cli/src/generate/parse_grammar.rs +++ b/cli/src/generate/parse_grammar.rs @@ -166,9 +166,12 @@ fn parse_rule(json: RuleJSON) -> Rule { f.chars() .filter(|c| { if *c == 'i' { - *c != 'u' // silently ignore unicode flag + true } else { - eprintln!("Warning: unsupported flag {c}"); + // silently ignore unicode flags + if *c != 'u' && *c != 'v' { + eprintln!("Warning: unsupported flag {c}"); + } false } })