summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-11-20 10:35:53 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-11-20 10:35:53 -0800
commit05849c4818342a0e0ecb597fd2452125b00d543e (patch)
treea597a80c0248767405b9bbc18c5e8b88b64fe46c /gitweb
parentMerge branch 'pw/maint-p4-rcs-expansion-newline' (diff)
parentgitweb.perl: fix %highlight_ext mappings (diff)
downloadtgif-05849c4818342a0e0ecb597fd2452125b00d543e.tar.xz
Merge branch 'rh/maint-gitweb-highlight-ext'
Fixes a clever misuse of perl's list interpretation. * rh/maint-gitweb-highlight-ext: gitweb.perl: fix %highlight_ext mappings
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl17
1 files changed, 8 insertions, 9 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 10ed9e51a5..ce8cb4af16 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -270,16 +270,15 @@ our %highlight_basename = (
our %highlight_ext = (
# main extensions, defining name of syntax;
# see files in /usr/share/highlight/langDefs/ directory
- map { $_ => $_ }
- qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl sql make),
+ (map { $_ => $_ } qw(py rb java css js tex bib xml awk bat ini spec tcl sql)),
# alternate extensions, see /etc/highlight/filetypes.conf
- 'h' => 'c',
- map { $_ => 'sh' } qw(bash zsh ksh),
- map { $_ => 'cpp' } qw(cxx c++ cc),
- map { $_ => 'php' } qw(php3 php4 php5 phps),
- map { $_ => 'pl' } qw(perl pm), # perhaps also 'cgi'
- map { $_ => 'make'} qw(mak mk),
- map { $_ => 'xml' } qw(xhtml html htm),
+ (map { $_ => 'c' } qw(c h)),
+ (map { $_ => 'sh' } qw(sh bash zsh ksh)),
+ (map { $_ => 'cpp' } qw(cpp cxx c++ cc)),
+ (map { $_ => 'php' } qw(php php3 php4 php5 phps)),
+ (map { $_ => 'pl' } qw(pl perl pm)), # perhaps also 'cgi'
+ (map { $_ => 'make'} qw(make mak mk)),
+ (map { $_ => 'xml' } qw(xml xhtml html htm)),
);
# You define site-wide feature defaults here; override them with