File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
packages/gitbook/src/components/Search Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " gitbook " : patch
3+ ---
4+
5+ Fix bug in search highlight in GBO
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ export function HighlightQuery(props: {
1515 query,
1616 text,
1717 highlight = [
18+ '-z-1' ,
19+ 'relative' ,
1820 'text-bold' ,
1921 'bg-primary' ,
2022 'text-contrast-primary' ,
@@ -33,7 +35,7 @@ export function HighlightQuery(props: {
3335 const matches = matchString ( text , query ) ;
3436
3537 return (
36- < span className = { tcls ( 'whitespace-break-spaces' ) } >
38+ < span className = { tcls ( 'relative z-2 whitespace-break-spaces' ) } >
3739 { matches . map ( ( entry , index ) => (
3840 < span key = { index } className = { tcls ( entry . match ? highlight : null ) } >
3941 { entry . text }
You can’t perform that action at this time.
0 commit comments