All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylvain Rabot <sylvain@abstraction.fr>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/3] gitweb: add extensions to highlight feature
Date: Thu, 16 Dec 2010 23:33:24 +0100	[thread overview]
Message-ID: <1292538804.2511.4.camel@kheops> (raw)
In-Reply-To: <m3y68slxj9.fsf@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 2089 bytes --]

On Thu, 2010-12-16 at 14:22 -0800, Jakub Narebski wrote:
> Sylvain Rabot <sylvain@abstraction.fr> writes:
> 
> > added: sql, php5, phps, bash, zsh, mk
> > 
> 
> There is one issue with this patch (see below), but otherwise I like
> it.
> 
> > Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
> > ---
> >  gitweb/gitweb.perl |    7 ++++---
> >  1 files changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> > index d521c93..db18d06 100755
> > --- a/gitweb/gitweb.perl
> > +++ b/gitweb/gitweb.perl
> > @@ -250,13 +250,14 @@ 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),
> > +		qw(py c cpp rb java css php pl js tex bib xml awk bat ini spec tcl sql),
> 
> Why did you remove 'sh' => 'sh' mapping?  Shouldn't it be
> 
>   -		qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl),
>   +		qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl sql),
> 

I removed it on purpose but should have not, I was thinking
the mapping made below would be enough but no, you're right.

> >  	# alternate extensions, see /etc/highlight/filetypes.conf
> >  	'h' => 'c',
> > +	map { $_ => 'sh'  } qw(bash zsh),
> 
> Good idea.

Does ksh, csh can be highlighted as sh too ?

> 
> >  	map { $_ => 'cpp' } qw(cxx c++ cc),
> > -	map { $_ => 'php' } qw(php3 php4),
> > +	map { $_ => 'php' } qw(php3 php4 php5 phps),
> 
> Good idea.
> 
> >  	map { $_ => 'pl'  } qw(perl pm), # perhaps also 'cgi'
> > -	'mak' => 'make',
> > +	map { $_ => 'make'} qw(mak mk),
> 
> Good idea.
> 
> Sidenote: git itself uses *.mak extension.  Is *.mk popular?

Don't know but mk is mapped to Makefiles in the gtksourceview lib so I
added it here.

> 
> >  	map { $_ => 'xml' } qw(xhtml html htm),
> >  );
> >  
> > -- 
> > 1.7.3.2
> > 
> 


-- 
Sylvain Rabot <sylvain@abstraction.fr>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2010-12-16 22:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-16 21:43 [PATCH 0/3] minor gitweb modifications Sylvain Rabot
2010-12-16 21:43 ` [PATCH 1/3] gitweb: add extensions to highlight feature Sylvain Rabot
2010-12-16 22:22   ` Jakub Narebski
2010-12-16 22:33     ` Sylvain Rabot [this message]
2010-12-17 11:17       ` Jakub Narebski
2010-12-16 21:43 ` [PATCH 2/3] gitweb: decorate a bit more remotes Sylvain Rabot
2010-12-16 22:23   ` Jakub Narebski
2010-12-20 12:04     ` Drew Northup
2010-12-16 21:43 ` [PATCH 3/3] gitweb: remove test when closing file descriptor Sylvain Rabot
2010-12-16 22:30   ` Jakub Narebski
2010-12-16 22:37     ` Sylvain Rabot
2010-11-16 23:02       ` Jakub Narebski
  -- strict thread matches above, loose matches on Subject: below --
2010-12-20 19:01 [PATCH 0/3 v2] minor gitweb modifications Sylvain Rabot
2010-12-20 19:01 ` [PATCH 1/3] gitweb: add extensions to highlight feature Sylvain Rabot
2010-12-29 19:33 [PATCH 0/3 v3] minor gitweb modifications Sylvain Rabot
2010-12-29 19:33 ` [PATCH 1/3] gitweb: add extensions to highlight feature Sylvain Rabot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1292538804.2511.4.camel@kheops \
    --to=sylvain@abstraction.fr \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.