author | Jakub Narebski <jnareb@gmail.com> | |
Mon, 27 Feb 2012 01:55:20 +0000 (02:55 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 27 Feb 2012 06:02:56 +0000 (22:02 -0800) | ||
commit | 07a40062aebc184f5aa1d6750fe80ab6fe120cc8 | |
tree | ab901ae5ce8409a80212c4f175aad21cd7ec58e9 | tree | snapshot |
parent | 337da8d2b0b8a8a86f0aa969bba2756126d6c090 | commit | diff |
gitweb: Highlight matched part of project name when searching projects
Use esc_html_match_hl() introduced in previous commit to escape HTML
and mark match, using span element with 'match' class. Currently only
the 'path' part (i.e. the project name) is highlighted; match might be
on the project description. Highlighting match in description is left
for next commit.
The code makes use of the fact that defined $search_regexp means that
there was search going on.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Use esc_html_match_hl() introduced in previous commit to escape HTML
and mark match, using span element with 'match' class. Currently only
the 'path' part (i.e. the project name) is highlighted; match might be
on the project description. Highlighting match in description is left
for next commit.
The code makes use of the fact that defined $search_regexp means that
there was search going on.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl | diff | blob | history |