diff options
author | Jakub Narebski <jnareb@gmail.com> | 2010-04-27 21:34:45 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-03 09:38:54 -0700 |
commit | 592ea4173af6b445042d74b989762fd41aecdf4c (patch) | |
tree | 5796be71ed85a7de0b18450576aef2dab3f2162e /t/t556x_common | |
parent | gitweb: Syntax highlighting support (diff) | |
download | tgif-592ea4173af6b445042d74b989762fd41aecdf4c.tar.xz |
gitweb: Refactor syntax highlighting support
This refactoring (adding guess_file_syntax and run_highlighter
subroutines) is meant to make it easier in the future to add support
for other syntax highlighing solutions, or make it smarter by not
re-running `git cat-file` second time.
Instead of looping over list of regexps (keys of %highlight_type hash),
make use of the fact that choosing syntax is based either on full
basename (%highlight_basename), or on file extension (%highlight_ext).
Add some basic test of syntax highlighting (with 'highlight' as
prerequisite) to t/t9500-gitweb-standalone-no-errors.sh test.
While at it make git_blob Perl style prettier.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t556x_common')
0 files changed, 0 insertions, 0 deletions