From: Gerfried Fuchs Date: Tue, 28 Jun 2011 05:57:36 +0000 (+0200) Subject: align the bug closes regex X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=66e13e020e7b338272a4516e3773c100826732c2;p=deb%2Fpackages.git align the bug closes regex --- diff --git a/lib/Parse/DebianChangelog/ChangesFilters.pm b/lib/Parse/DebianChangelog/ChangesFilters.pm index 8434770..6e5da9c 100644 --- a/lib/Parse/DebianChangelog/ChangesFilters.pm +++ b/lib/Parse/DebianChangelog/ChangesFilters.pm @@ -90,7 +90,7 @@ sub email_to_ddpo { } sub bugs_to_bts { - (my $text = $_[0]) =~ s|Closes:\s*(?:Bug)?\#\d+(?:\s*,\s*(?:Bug)?\#\d+)* + (my $text = $_[0]) =~ s|closes:\s*(?:bug)?\#?\s?\d+(?:\s*,\s*(?:bug)?\#?\s?\d+)* |my $tmp = $&; { no warnings; $tmp =~ s@(Bug)?\#(\d+)@$1\#$2@ig; } "$tmp" diff --git a/lib/Parse/DebianChangelog/Util.pm b/lib/Parse/DebianChangelog/Util.pm index 9086249..f5c9acc 100644 --- a/lib/Parse/DebianChangelog/Util.pm +++ b/lib/Parse/DebianChangelog/Util.pm @@ -67,7 +67,7 @@ sub find_closes { my $changes = shift; my @closes = (); - while ($changes && ($changes =~ /closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*/ig)) { + while ($changes && ($changes =~ /closes:\s*(?:bug)?\#?\s?\d+(?:\s*,\s*(?:bug)?\#?\s?\d+)*/ig)) { push(@closes, $& =~ /\#?\s?(\d+)/g); }