Re: [PATCH 6/8] gitweb: Highlight interesting parts of diff
- From
Jeff King <peff@peff.net>
- Date
- Feb 14, 2012, 08:20 UTC
- Message-ID
- <20120214082051.GA9911@sigill.intra.peff.net>
- In-Reply-To
- <7vpqdh999t.fsf@alter.siamese.dyndns.org>
On Mon, Feb 13, 2012 at 11:14:22PM -0800, Junio C Hamano wrote:
Show 10 quoted lines
> > We could tech diff-highlight to produce diffs
> > marked with -{} and +{} (this is the notation used by Jeff in one of his
> > recent patches) or something like this and then just convert that into
> > HTML markup.
>
> this implementation strategy would not work well, given that the payload
> can contain arbitrary letter sequence (e.g. a Perl script that wants be
> explicit when writing a hashref literal write +{...} to disambiguate it
> from a block). If you are going to modularize diff-highlight and reuse
> it, it needs to learn how to talk HTML to properly escape the payload.They're both written in perl; perhaps a more sensible solution would be to lib-ify diff-highlight and use it directly inside gitweb.
-Peff