Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

Re: [RFC/PATCH] gitweb: Syntax highlighting support

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:48:18

Jakub Narebski [off-list ref] writes:
From: Johannes Schindelin <redacted>

It requires the 'highlight' program to do all the heavy-lifting:
http://www.andre-simon.de / http://wiki.andre-simon.de
[...]
---
This is a RFC, because there exist other syntax highlighters that can
function as filter (take input from STDIN, and write result to STDOUT),
and have (X)HTML among supported output formats.  Beside 'highlight'
by Andre Simon, there is also 'source-highlight' (GNU Source Highlight),
and probably other programs.  
Actually GNU Source Highlight (http://www.gnu.org/software/src-highlite)
as it is now wouldn't be a good fit for gitweb, because it lacks 
equivalent of Highlight '--fragment' option; even with '--no-doc' it
prefixes contents with some comments and wraps the whole with <pre><tt>
tags.

On the other hand side one can also use Perl modules from CPAN for
syntax highlighting.  It would be nice to have this option for syntax
highlighting in gitweb.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help