X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/4830c61dad195176acb9f21ea6846cefbd75091a17d7d12d747f43551b07448f..ce6f98e12cf2125f4650bd90edaf88a4c7c13817ac69e2e7b5bef58a455797d7:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 61ee84c..1e0af11 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -2037,10 +2037,24 @@ sub format_log_line_html { my $line = shift; $line = esc_html($line, -nbsp=>1); - $line =~ s{\b([0-9a-fA-F]{8,40})\b}{ + $line =~ s{ + \b + ( + # The output of "git describe", e.g. v2.10.0-297-gf6727b0 + # or hadoop-20160921-113441-20-g094fb7d + (?a({-href => href(action=>"object", hash=>$1), -class => "text"}, $1); - }eg; + }egx; return $line; }