Skip to content

Commit 1d05d1d

Browse files
committed
Merge branch 'rh/maint-gitweb-highlight-ext' into maint
Syntax highlighting in "gitweb" was not quite working. * rh/maint-gitweb-highlight-ext: gitweb.perl: fix %highlight_ext mappings
2 parents 2a7f6ff + 048b399 commit 1d05d1d

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

gitweb/gitweb.perl

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,16 +270,15 @@ sub evaluate_uri {
270270
our %highlight_ext = (
271271
# main extensions, defining name of syntax;
272272
# see files in /usr/share/highlight/langDefs/ directory
273-
map { $_ => $_ }
274-
qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl sql make),
273+
(map { $_ => $_ } qw(py rb java css js tex bib xml awk bat ini spec tcl sql)),
275274
# alternate extensions, see /etc/highlight/filetypes.conf
276-
'h' => 'c',
277-
map { $_ => 'sh' } qw(bash zsh ksh),
278-
map { $_ => 'cpp' } qw(cxx c++ cc),
279-
map { $_ => 'php' } qw(php3 php4 php5 phps),
280-
map { $_ => 'pl' } qw(perl pm), # perhaps also 'cgi'
281-
map { $_ => 'make'} qw(mak mk),
282-
map { $_ => 'xml' } qw(xhtml html htm),
275+
(map { $_ => 'c' } qw(c h)),
276+
(map { $_ => 'sh' } qw(sh bash zsh ksh)),
277+
(map { $_ => 'cpp' } qw(cpp cxx c++ cc)),
278+
(map { $_ => 'php' } qw(php php3 php4 php5 phps)),
279+
(map { $_ => 'pl' } qw(pl perl pm)), # perhaps also 'cgi'
280+
(map { $_ => 'make'} qw(make mak mk)),
281+
(map { $_ => 'xml' } qw(xml xhtml html htm)),
283282
);
284283

285284
# You define site-wide feature defaults here; override them with

0 commit comments

Comments
 (0)