Re: [PATCH 6/8] gitweb: Highlight interesting parts of diff
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:04
Michal Kiedrowicz [off-list ref] 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.