Skip to content

Commit a41aaa1

Browse files
committed
fix: make intersection supported in JS
1 parent 9d839c1 commit a41aaa1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pomsky-lib/src/exprs/intersection.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ impl Compile for Intersection {
2929
})?;
3030

3131
if let Regex::CompoundCharSet(_) = regex {
32-
if let RegexFlavor::Java | RegexFlavor::Ruby | RegexFlavor::Rust = options.flavor {
33-
// supported
34-
} else {
32+
if !matches!(
33+
options.flavor,
34+
RegexFlavor::JavaScript | RegexFlavor::Java | RegexFlavor::Ruby | RegexFlavor::Rust
35+
) {
3536
return Err(CompileErrorKind::Unsupported(
3637
Feature::CharSetIntersection,
3738
options.flavor,

0 commit comments

Comments
 (0)