Skip to content

Commit 8b22e44

Browse files
fix(urlpattern): remove inline (?u) flag from regex generation (#74)
1 parent 453c13d commit 8b22e44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/regexp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ impl RegExp for regex::Regex {
2222
RegexSyntax::Rust
2323
}
2424

25-
fn parse(pattern: &str, flags: &str, _force_eval: bool) -> Result<Self, ()> {
26-
regex::Regex::new(&format!("(?{flags}){pattern}")).map_err(|_| ())
25+
fn parse(pattern: &str, _flags: &str, _force_eval: bool) -> Result<Self, ()> {
26+
regex::Regex::new(pattern).map_err(|_| ())
2727
}
2828

2929
fn matches<'a>(&self, text: &'a str) -> Option<Vec<Option<&'a str>>> {

0 commit comments

Comments
 (0)