mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-17 16:15:22 +00:00
901f0268cc
Multi-word search queries highlight each word independently, so a phrase like "maria db" against "MariaDB" produced two touching highlight spans whose negative margins and rounded corners overlapped into a doubled pill. Coalesce contiguous matched parts into a single highlight span. The pure matching logic is extracted to HighlightQuery.utils.ts so it can be unit-tested without pulling in the React JSX runtime. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H4jiy83BeKXZjEH4Jqwn3Z