Highlight contiguous phrase matches as one block

This commit is contained in:
dtonon 2026-08-12 19:30:17 +01:00
parent 46176511f3
commit 2ab69e4cd3
3 changed files with 53 additions and 19 deletions

View file

@ -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;