From 66e13e020e7b338272a4516e3773c100826732c2 Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Tue, 28 Jun 2011 07:57:36 +0200 Subject: [PATCH] align the bug closes regex --- lib/Parse/DebianChangelog/ChangesFilters.pm | 2 +- lib/Parse/DebianChangelog/Util.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.39.5