From f3a3170bc7ff3ed7397871f5dee0a506b334826c Mon Sep 17 00:00:00 2001 From: Aaron Taylor Date: Thu, 17 Jun 2021 17:01:12 -0700 Subject: [PATCH] Pretty-format markdown file in blob mode. --- gitweb.cgi | 5 +++++ 1 file changed, 5 insertions(+) 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>) { -- 2.20.1