Re: [PATCH 6/8] gitweb: Highlight interesting parts of diff
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 14, 2012, 07:14 UTC
- Message-ID
- <7vpqdh999t.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120214075439.14f1d2b7@mkiedrowicz.ivo.pl>
Michal Kiedrowicz <michal.kiedrowicz@gmail.com> writes:
> I just started to wonder if we couldn't use output from Jeff's > diff-highlight for gitweb.
That could be a sensible approach, but
> 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.