From 3df1142c72d92229493d47a355459d70790fcaaf Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 21 Nov 2018 14:33:12 -0500 Subject: [PATCH] Bug 1508912 - Searchfox URLs are broken in bug comments --- extensions/BMO/Extension.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index ab8aae161..d093be29c 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/(?!\w+\/)([\w\.-]+)\/([\w\.-]+)\#(\d+)\b/, + match => qr/(\s)([A-Za-z0-9_\.-]+)\/([A-Za-z0-9_\.-]+)\#([0-9]+)\b/, replace => sub { my $args = shift; - 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#; + 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#; } }); -- 2.47.3