Title: [276640] trunk/Websites/bugs.webkit.org
Revision
276640
Author
[email protected]
Date
2021-04-27 08:34:44 -0700 (Tue, 27 Apr 2021)

Log Message

Bugzilla needs to linkify identifiers (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=224312
<rdar://problem/75845629>

Reviewed by Aakash Jain.

* extensions/Commits/Extension.pm:
(bug_format_comment): Add regex to replace identifiers with a commits.webkit.org link.
(_replace_reference): This function replaces both revisions and identifiers.
(_replace_revision): Renamed _replace_reference.

Modified Paths

Diff

Modified: trunk/Websites/bugs.webkit.org/ChangeLog (276639 => 276640)


--- trunk/Websites/bugs.webkit.org/ChangeLog	2021-04-27 15:29:29 UTC (rev 276639)
+++ trunk/Websites/bugs.webkit.org/ChangeLog	2021-04-27 15:34:44 UTC (rev 276640)
@@ -1,3 +1,16 @@
+2021-04-27  Jonathan Bedard  <[email protected]>
+
+        Bugzilla needs to linkify identifiers (Part 2)
+        https://bugs.webkit.org/show_bug.cgi?id=224312
+        <rdar://problem/75845629>
+
+        Reviewed by Aakash Jain.
+
+        * extensions/Commits/Extension.pm:
+        (bug_format_comment): Add regex to replace identifiers with a commits.webkit.org link.
+        (_replace_reference): This function replaces both revisions and identifiers.
+        (_replace_revision): Renamed _replace_reference.
+
 2021-04-23  Jonathan Bedard  <[email protected]>
 
         Bugzilla needs to linkify identifiers (Part 1)

Modified: trunk/Websites/bugs.webkit.org/extensions/Commits/Extension.pm (276639 => 276640)


--- trunk/Websites/bugs.webkit.org/extensions/Commits/Extension.pm	2021-04-27 15:29:29 UTC (rev 276639)
+++ trunk/Websites/bugs.webkit.org/extensions/Commits/Extension.pm	2021-04-27 15:34:44 UTC (rev 276640)
@@ -34,15 +34,16 @@
     my $regexes = $args->{'regexes'};
 
     # Should match "r12345" and "trac.webkit.org/r12345" but not "https://trac.webkit.org/r12345"
-    push(@$regexes, { match => qr/(?<!\/)\b((r[[:digit:]]{5,}))\b/, replace => \&_replace_revision });
-    push(@$regexes, { match => qr/(?<!\/)(trac.webkit.org\/(r[[:digit:]]{5,}))\b/, replace => \&_replace_revision });
+    push(@$regexes, { match => qr/(?<!\/)\b((r[[:digit:]]{5,}))\b/, replace => \&_replace_reference });
+    push(@$regexes, { match => qr/(?<!\/)(trac.webkit.org\/(r[[:digit:]]{5,}))\b/, replace => \&_replace_reference });
+    push(@$regexes, { match => qr/(?<!\/)\b((\d*\.?\d+@\S+))\b/, replace => \&_replace_reference });
 }
 
-sub _replace_revision {
+sub _replace_reference {
     my $args = shift;
     my $text = $args->{matches}->[0];
-    my $revision = $args->{matches}->[1];
-    return qq{<a href=""
+    my $reference = $args->{matches}->[1];
+    return qq{<a href=""
 };
 
 # This must be the last line of your extension.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to