Enabling `*.go` files in the syntax highlighter. master origin/HEAD origin/master
authorAaron Taylor <ataylor@subgeniuskitty.com>
Tue, 7 Feb 2023 06:37:38 +0000 (22:37 -0800)
committerAaron Taylor <ataylor@subgeniuskitty.com>
Tue, 7 Feb 2023 06:37:38 +0000 (22:37 -0800)
gitweb.cgi

index a9eba00..93d9600 100755 (executable)
@@ -275,7 +275,7 @@ our %highlight_basename = (
 our %highlight_ext = (
        # main extensions, defining name of syntax;
        # see files in /usr/share/highlight/langDefs/ directory
-       (map { $_ => $_ } qw(py rb java css js tex bib xml awk bat ini spec tcl sql)),
+       (map { $_ => $_ } qw(py rb java css js tex bib xml awk bat ini spec tcl sql go)),
        # alternate extensions, see /etc/highlight/filetypes.conf
        (map { $_ => 'c'   } qw(c h)),
        (map { $_ => 'sh'  } qw(sh bash zsh ksh)),
@@ -7206,7 +7206,9 @@ sub git_blob {
                my $absolute_file_name = "$projectroot/$project";
                $absolute_file_name =~ s/\.git$//;
                $absolute_file_name = $absolute_file_name . $file_name;
+               print "<div class=\"readme\">";
                insert_markdown_file($absolute_file_name);
+               print "</div>";
        } else {
                my $nr;
                while (my $line = <$fd>) {