Skip to content

Commit 17504aa

Browse files
committed
Make sure strings match along lines
This is redundant for most usages of ack, but fixes a bug when using -l
1 parent e18c0ac commit 17504aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ sub build_regex {
331331
$str = "(?i)$str";
332332
}
333333

334-
my $re = eval { qr/$str/ };
334+
my $re = eval { qr/$str/m };
335335
if ( !$re ) {
336336
die "Invalid regex '$str':\n $@";
337337
}

0 commit comments

Comments
 (0)