# [PATCH] gitweb: add extensions to highlight feature map

2 messages from 2011-10-16 to 2011-10-16. Participants: Lénaïc Huard, Philip Oakley.
Thread: https://gitlist.dev/t/28695

## Lénaïc Huard, 2011-10-16 16:59

Subject: [PATCH] gitweb: add extensions to highlight feature map
Message-ID: <201110161859.49817.lenaic@lhuard.fr.eu.org>
URL: https://gitlist.dev/e/201110161859.49817.lenaic%40lhuard.fr.eu.org

```
added: hpp, m

Signed-off-by: Lénaïc Huard <lenaic@lhuard.fr.eu.org>
---
 gitweb/gitweb.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 85d64b2..75e4854 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -262,11 +262,12 @@ our %highlight_ext = (
        # alternate extensions, see /etc/highlight/filetypes.conf
        'h' => 'c',
        map { $_ => 'sh'  } qw(bash zsh ksh),
-       map { $_ => 'cpp' } qw(cxx c++ cc),
+       map { $_ => 'cpp' } qw(cxx c++ cc hpp),
        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),
+       'm' => 'objc',
 );
 
 # You define site-wide feature defaults here; override them with
-- 
1.7.7

```

## Philip Oakley, 2011-10-16 23:18

Subject: Re: [PATCH] gitweb: add extensions to highlight feature map
Message-ID: <C6FB1388B4E54701B6610875A3367BE2@PhilipOakley>
URL: https://gitlist.dev/e/C6FB1388B4E54701B6610875A3367BE2%40PhilipOakley
In-Reply-To: <201110161859.49817.lenaic@lhuard.fr.eu.org>

```
From: "Lénaïc Huard" <lenaic@lhuard.fr.eu.org>
Sent: Sunday, October 16, 2011 5:59 PM
> added: hpp, m

'm' files can be matlab files, and matlab can benefit from git's branch 
model. Matlab expectes filenames to be identical to function names(!), so 
branching function variants makes for easier development. Without git you 
can't easily refactor.
Philip

>
> Signed-off-by: Lénaïc Huard <lenaic@lhuard.fr.eu.org>
> ---
> gitweb/gitweb.perl |    3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 85d64b2..75e4854 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -262,11 +262,12 @@ our %highlight_ext = (
>        # alternate extensions, see /etc/highlight/filetypes.conf
>        'h' => 'c',
>        map { $_ => 'sh'  } qw(bash zsh ksh),
> -       map { $_ => 'cpp' } qw(cxx c++ cc),
> +       map { $_ => 'cpp' } qw(cxx c++ cc hpp),
>        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),
> +       'm' => 'objc',
> );
>
> # You define site-wide feature defaults here; override them with
> -- 
> 1.7.7
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.1831 / Virus Database: 2090/4554 - Release Date: 10/15/11
> 

```
