index: partial path prefix in git commit message
[sheet.git] / index.plp
index 022a2981b668cafa1cca8ecfca7a1a871a2351c8..690902542701d9eb01aea324ef1fc840ea901cfe 100644 (file)
--- a/index.plp
+++ b/index.plp
@@ -35,7 +35,9 @@ if (open my $log, '<', 'UPDATE') {{
        EscapeHTML $line;
        my ($date, $subject) = split /[\t\n]/, $line;
        $date =~ s/ \K/<small>/ and $date .= '</small>';
-       $subject =~ s{\A(\w+)(?=: )}{showlink($1, -e "$1.plp" && "/$1")}e;
+       $subject =~ s{\A (\w+) (?= (?:/\w+)* :\h )}{
+               showlink($1, -e "$1.plp" && "/$1");
+       }ex;
        say "<p><strong>Last update</strong>: $date $subject</p>";
 }}