Skip to content

Commit

Permalink
Make sure strings match along lines
Browse files Browse the repository at this point in the history
This is redundant for most usages of ack, but fixes
a bug when using -l
  • Loading branch information
hoelzro committed Sep 10, 2014
1 parent e18c0ac commit 17504aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ack
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ sub build_regex {
$str = "(?i)$str";
}

my $re = eval { qr/$str/ };
my $re = eval { qr/$str/m };
if ( !$re ) {
die "Invalid regex '$str':\n $@";
}
Expand Down

0 comments on commit 17504aa

Please sign in to comment.