git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 18, 2010, 22:01 UTC
Message-ID
<m3sk8ymcga.fsf@localhost.localdomain>
In-Reply-To
<20100217212855.2014.49834.stgit@localhost.localdomain>
Jakub Narebski <jnareb@gmail.com> writes:
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
> 
> It requires the 'highlight' program to do all the heavy-lifting:
> http://www.andre-simon.de / http://wiki.andre-simon.de
[...]
Show 6 quoted lines
> ---
> 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
Previous: Jakub Narebski
Message 4 of 4 in “gitweb: Syntax highlighting support”
  1. gitweb: Syntax highlighting supportJakub Narebski, Feb 17, 2010
  2. Johannes SchindelinFeb 18, 2010
  3. Jakub NarebskiFeb 18, 2010
  4. Jakub NarebskiFeb 18, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.