Highlight contiguous phrase matches as one block
This commit is contained in:
parent
46176511f3
commit
2ab69e4cd3
3 changed files with 53 additions and 19 deletions
|
|
@ -224,7 +224,7 @@
|
|||
return;
|
||||
}
|
||||
const roots = threadEl.querySelectorAll("h1, [data-quote-post-index]");
|
||||
const first = applyHighlights(roots, q.split(/\s+/));
|
||||
const first = applyHighlights(roots, q);
|
||||
const key = `${page.params.id}|${q}`;
|
||||
if (first && scrolledFor !== key) {
|
||||
scrolledFor = key;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue