From: Aaron Taylor Date: Fri, 18 Jun 2021 00:01:12 +0000 (-0700) Subject: Pretty-format markdown file in blob mode. X-Git-Url: http://git.subgeniuskitty.com/gitweb-sgk/.git/commitdiff_plain/f3a3170bc7ff3ed7397871f5dee0a506b334826c Pretty-format markdown file in blob mode. --- diff --git a/gitweb.cgi b/gitweb.cgi index c24d40b..a9eba00 100755 --- a/gitweb.cgi +++ b/gitweb.cgi @@ -7202,6 +7202,11 @@ sub git_blob { 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>) {