Pretty-format markdown file in blob mode.
authorAaron Taylor <ataylor@subgeniuskitty.com>
Fri, 18 Jun 2021 00:01:12 +0000 (17:01 -0700)
committerAaron Taylor <ataylor@subgeniuskitty.com>
Fri, 18 Jun 2021 00:01:12 +0000 (17:01 -0700)
gitweb.cgi

index c24d40b..a9eba00 100755 (executable)
@@ -7202,6 +7202,11 @@ sub git_blob {
                      href(action=>"blob_plain", hash=>$hash,
                           hash_base=>$hash_base, file_name=>$file_name) .
                      qq!" />\n!;
                      href(action=>"blob_plain", hash=>$hash,
                           hash_base=>$hash_base, file_name=>$file_name) .
                      qq!" />\n!;
+       } elsif ($file_name =~ /\.md$/) {
+               my $absolute_file_name = "$projectroot/$project";
+               $absolute_file_name =~ s/\.git$//;
+               $absolute_file_name = $absolute_file_name . $file_name;
+               insert_markdown_file($absolute_file_name);
        } else {
                my $nr;
                while (my $line = <$fd>) {
        } else {
                my $nr;
                while (my $line = <$fd>) {