summaryrefslogtreecommitdiffstats
path: root/crates/regex/src/matcher.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/regex/src/matcher.rs')
-rw-r--r--crates/regex/src/matcher.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/regex/src/matcher.rs b/crates/regex/src/matcher.rs
index 92ef5c76..725aae3b 100644
--- a/crates/regex/src/matcher.rs
+++ b/crates/regex/src/matcher.rs
@@ -52,8 +52,12 @@ impl RegexMatcherBuilder {
let matcher = RegexMatcherImpl::new(&chir)?;
log::trace!("final regex: {:?}", matcher.regex());
+ let mut config = self.config.clone();
+ // We override the line terminator in case the configured expr doesn't
+ // support it.
+ config.line_terminator = chir.line_terminator();
Ok(RegexMatcher {
- config: self.config.clone(),
+ config,
matcher,
fast_line_regex,
non_matching_bytes,