diff --git a/crates/js/src/regex.rs b/crates/js/src/regex.rs index 2342ddd..c4decfe 100644 --- a/crates/js/src/regex.rs +++ b/crates/js/src/regex.rs @@ -785,7 +785,7 @@ fn match_node(ctx: &mut MatchContext, node: &Node, pos: usize) -> Option Node::Dot => { if pos < ctx.chars.len() { let ch = ctx.chars[pos]; - if ctx.flags.dot_all || (ch != '\n' && ch != '\r') { + if ctx.flags.dot_all || !is_line_terminator(ch) { Some(pos + 1) } else { None