perf(web): fast rules search with memoized sections and highlighting

Memoize Markdown rendering (React.memo) so sections parse once on mount.
Search filters by toggling visibility (no re-render), with debounced
input and DOM-based text highlighting for matches in both titles and
content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bas van Rossem
2026-02-19 17:48:45 +01:00
parent 69e53ed695
commit 19666efd5b
2 changed files with 136 additions and 26 deletions

View File

@@ -671,3 +671,11 @@ details[open] > .rules-summary::before {
.rules-content p {
margin: var(--spacing-xs) 0;
}
mark.search-hl {
background: rgba(255, 170, 0, 0.35);
color: inherit;
border-radius: 2px;
padding: 0 1px;
}