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

Re: [PATCH] gitweb: move highlight config out of guess_file_syntax()

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 26, 2010, 20:45 UTC
Message-ID
<201007262245.35518.jnareb@gmail.com>
In-Reply-To
<201007260135.35059.jnareb@gmail.com>
On Mon, 26 Jul 2010, Jakub Narębski wrote:
Show 22 quoted lines
> On Sat, 24 Jul 2010, Alejandro R. Sedeño wrote:
> 
> > Move highlight config out of guess_file_syntax() so that it can be
> > extended/overridden by system/user configuration.
> > 
> > Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
> 
> Good idea.
> 
> The only _possible_ problem is that this configuration is fairly specific
> with respect to currently the only one sipported hightlighter, i.e. the
> external binary 'highlight' (http://www.andre-simon.de).  If we are to
> add support for other programs (e.g. GNU Source Highlight) or Perl modules
> for syntax highlighting (e.g. Syntax::Highlight::Engine::Kate or 
> Beautifier) in the future, this could mean backward incompatibile change.
> 
> The culprit is using extensions (in 'highlight' main syntax files are 
> named by extensions) rather than format names in %highlight_basename
> and %highlight_ext, e.g. 'py' rather than 'python'.  I don't know if
> it would be much of the problem.
> 
> So perhaps I am worrying about nothing...

I am worrying about nothing. The default syntax highlighter would be 'highlight' program; if one wants to change highlighter, one can also modify required configuration (names of 'syntax' to choose from might be different for different highlighting engines).

Therefore:
Acked-by: Jakub Narebski <jnareb@gmail.com>
-- 
Jakub Narebski
Poland
Previous: Alejandro R. SedeñoNext: Alejandro R. Sedeño
Message 5 of 6 in “gitweb: move highlight config out of guess_file_syntax()”
  1. gitweb: move highlight config out of guess_file_syntax()Alejandro R. Sedeño, Jul 24, 2010
  2. Alejandro R. SedeñoJul 25, 2010
  3. Jakub NarebskiJul 26, 2010
  4. Alejandro R. SedeñoJul 26, 2010
  5. Jakub NarebskiJul 26, 2010
  6. gitweb: move highlight config out of guess_file_syntax()Alejandro R. Sedeño, Jul 28, 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.