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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user