Re: [PATCH 6/8] gitweb: Highlight interesting parts of diff
> Jakub Narebski <jnareb@gmail.com> wrote:
> > Jakub Narebski <jnareb@gmail.com> writes:
Show 14 quoted lines
> > > Anyway I have send to git mailing list a patch series, which in one
> > > of patches adds esc_html_match_hl($str, $regexp) to highlight
> > > matches in a string.
>
> Yeah, I saw that but after seeing that they accept different arguments
> I decided to leave them alone.
>
> > > Your esc_html_mark_range(), after a
> > > generalization, could be used as underlying "engine".
> > >
> > > Something like this, perhaps (untested):
>
> I think I'll leave it to you after merging both these series to
> master :)
Yes, you are right. Let's do it when we actually need it.
[...]
> > > # Highlight selected fragments of string, using given CSS class,
> > > # and escape HTML. It is assumed that fragments do not overlap.
> > > # Regions are passed as list of pairs (array references).
> > > sub esc_html_hl {> > Actually we can accomodate both operating on string and operating on
> > array of characters in a single subroutine. Though it can be left for
> > later commit, anyway...
--
Jakub Narebski
Poland