}
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+)@<a class="buglink" href="http://bugs.debian.org/$2">$1\#$2</a>@ig; }
"$tmp"
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);
}