Skip to content

Commit

Permalink
Merge pull request #122 from so-fancy/hunkregex
Browse files Browse the repository at this point in the history
Adjust hunk header regex for reality.
  • Loading branch information
paulirish committed Mar 9, 2016
2 parents fbf440d + 8c34dae commit 353cb07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/header_clean/header_clean.pl
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
sub parse_hunk_header {
my ($line) = @_;
my ($o_ofs, $o_cnt, $n_ofs, $n_cnt) =
$line =~ /^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/;
$line =~ /^@@+(?: -(\d+)(?:,(\d+))?)+ \+(\d+)(?:,(\d+))? @@+/;
$o_cnt = 1 unless defined $o_cnt;
$n_cnt = 1 unless defined $n_cnt;
return ($o_ofs, $o_cnt, $n_ofs, $n_cnt);
Expand Down

0 comments on commit 353cb07

Please sign in to comment.