From: rh <richard_hubbe11@lavabit.com>
To: git@vger.kernel.org
Subject: [PATCH] gitweb.perl: fix %highlight_ext
Date: Mon, 29 Oct 2012 09:42:07 -0700 [thread overview]
Message-ID: <20121029094207.deafafed22ea70fbc4fbd4bb@lavabit.com> (raw)
I also consolidated exts where applicable.
i.e. c and h maps to c
--
diff --git a/a/gitweb.cgi b/b/gitweb.cgi
index 060db27..155b238 100755
--- a/a/gitweb.cgi
+++ b/b/gitweb.cgi
@@ -246,19 +246,19 @@ our %highlight_basename = (
'Makefile' => 'make',
);
# match by extension
+
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
next reply other threads:[~2012-10-29 16:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-29 16:42 rh [this message]
2012-11-02 14:54 ` [PATCH] gitweb.perl: fix %highlight_ext Jeff King
2012-11-02 17:41 ` rh
2012-11-02 21:18 ` rh
2012-11-04 13:45 ` Jeff King
2012-11-04 17:43 ` rh
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121029094207.deafafed22ea70fbc4fbd4bb@lavabit.com \
--to=richard_hubbe11@lavabit.com \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).