@@ -250,13 +250,14 @@ sub evaluate_uri {
250
250
# main extensions, defining name of syntax;
251
251
# see files in /usr/share/highlight/langDefs/ directory
252
252
map { $_ => $_ }
253
- qw( py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl) ,
253
+ qw( py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl sql make ) ,
254
254
# alternate extensions, see /etc/highlight/filetypes.conf
255
255
' h' => ' c' ,
256
+ map { $_ => ' sh' } qw( bash zsh ksh) ,
256
257
map { $_ => ' cpp' } qw( cxx c++ cc) ,
257
- map { $_ => ' php' } qw( php3 php4) ,
258
+ map { $_ => ' php' } qw( php3 php4 php5 phps ) ,
258
259
map { $_ => ' pl' } qw( perl pm) , # perhaps also 'cgi'
259
- ' mak ' => ' make' ,
260
+ map { $_ => ' make' } qw( mak mk ) ,
260
261
map { $_ => ' xml' } qw( xhtml html htm) ,
261
262
);
262
263
@@ -3464,8 +3465,7 @@ sub run_highlighter {
3464
3465
my ($fd , $highlight , $syntax ) = @_ ;
3465
3466
return $fd unless ($highlight && defined $syntax );
3466
3467
3467
- close $fd
3468
- or die_error(404, " Reading blob failed" );
3468
+ close $fd ;
3469
3469
open $fd , quote_command(git_cmd(), " cat-file" , " blob" , $hash )." | " .
3470
3470
quote_command($highlight_bin ).
3471
3471
" --xhtml --fragment --syntax $syntax |"
0 commit comments