Pretty-format markdown file in blob mode.
[gitweb-sgk] / 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>) {