From: Kohei Yoshino Date: Wed, 14 Nov 2018 22:47:09 +0000 (-0500) Subject: Bug 1351116 - github issue links are not expanded in parentheses X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a3b0efdcf890a5f6441da8e2611b4423196ff11;p=thirdparty%2Fbugzilla.git Bug 1351116 - github issue links are not expanded in parentheses --- diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index 58a1d02f9..1914cfb1d 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -724,13 +724,13 @@ sub bug_format_comment { # link github pull requests and issues push (@$regexes, { - match => qr/(\s)([A-Za-z0-9_\.-]+)\/([A-Za-z0-9_\.-]+)\#([0-9]+)\b/, + match => qr/\b([A-Za-z0-9_\.-]+)\/([A-Za-z0-9_\.-]+)\#([0-9]+)\b/, replace => sub { my $args = shift; - my $owner = html_quote($args->{matches}->[1]); - my $repo = html_quote($args->{matches}->[2]); - my $number = html_quote($args->{matches}->[3]); - return qq# $owner/$repo\#$number#; + my $owner = html_quote($args->{matches}->[0]); + my $repo = html_quote($args->{matches}->[1]); + my $number = html_quote($args->{matches}->[2]); + return qq#$owner/$repo\#$number#; } });