File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/app/components/HighlightedText Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1+ Fix HighlightedText gaps in search results (parent style ` gap: 3 ` )
Original file line number Diff line number Diff line change @@ -77,19 +77,19 @@ export const HighlightedText: FC<HighlightedTextProps> = ({
7777 const task = part ?? findTextMatch ( text , [ pattern ] , findOptions )
7878
7979 if ( text === undefined ) return undefined // Nothing to display
80- if ( task === NO_MATCH ) return text // We don't have to highlight anything
80+ if ( task === NO_MATCH ) return < span > { text } </ span > // We don't have to highlight anything
8181
8282 const beginning = text . substring ( 0 , task . startPos )
8383 const focus = text . substring ( task . startPos , task . endPos )
8484 const end = text . substring ( task . endPos )
8585
8686 return (
87- < >
87+ < span >
8888 { beginning }
8989 < Box component = "mark" sx = { sx } >
9090 { focus }
9191 </ Box >
9292 { end }
93- </ >
93+ </ span >
9494 )
9595}
You can’t perform that action at this time.
0 commit comments