mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed problem with search highlighting and ELCode
SVN revision: 1516
This commit is contained in:
parent
d56d900810
commit
9865863656
@ -15578,7 +15578,7 @@ void highlight_searchtext(regex_t * re_buf, char *src, char *dst, int hidden)
|
||||
size = pmatch[0].rm_so;
|
||||
|
||||
/* abort if zero length match, for example from "m*" */
|
||||
if (size == 0) {
|
||||
if (pmatch[0].rm_eo - pmatch[0].rm_so == 0) {
|
||||
status = REG_NOMATCH;
|
||||
strcpy(pt1, pt);
|
||||
break;
|
||||
@ -17072,7 +17072,9 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf
|
||||
text1[i] = 0;
|
||||
*/
|
||||
|
||||
highlight_searchtext(re_buf, text, text1, strieq(encoding, "plain") || !strieq(mode, "Full"));
|
||||
highlight_searchtext(re_buf, text, text1, strieq(encoding, "plain") ||
|
||||
strieq(encoding, "ELCode") ||
|
||||
!strieq(mode, "Full"));
|
||||
strlcpy(text, text1, TEXT_SIZE);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user