Thread (61 messages) flat view 61 messages, 3 authors, 2016-06-15

Re: [PATCH 6/8] gitweb: Highlight interesting parts of diff

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:53:04

Michal Kiedrowicz wrote:
Jakub Narebski [off-list ref] wrote:
quoted
Jakub Narebski [off-list ref] writes:
[...]
quoted
quoted
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.
quoted
quoted
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.

[...]
quoted
quoted
   # 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 {
[...]
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help