File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11( function ( global , doc ) {
22 let match ;
33 const search_query = ( match = doc . location . search . match ( / s q = ( .* ?) ( & | $ ) / ) ) ? match [ 1 ] : '' ;
4- const parsed_search_query = decodeURI ( search_query . replace ( '+' , ' ' ) ) ;
4+ const parsed_search_query = decodeURI ( search_query . replaceAll ( '+' , ' ' ) ) ;
55 const search_page = ( match = doc . location . search . match ( / p = ( \d * ?) ( & | $ ) / ) ) ? match [ 1 ] : 1 ;
66 const parsed_search_page = parseInt ( search_page ) ;
77 let version = doc . location . pathname . split ( '/' ) [ 2 ] ;
6868 let breadcrumbsHTML = '' ;
6969 let contentHTML = '' ;
7070
71- if ( hit . content && ! hit . _highlightResult . content . fullyHighlighted && hit . _highlightResult . content . matchedWords . length ) {
71+ if ( hit . content && hit . _highlightResult . content . matchedWords . length && ( ! hit . _highlightResult . content . fullyHighlighted || 1 < hit . _highlightResult . content . matchedWords . length ) ) {
7272 contentHTML = `<div class="instantsearch__entry-content">
7373 ${ instantsearch . highlight ( {
7474 attribute : `content` ,
You can’t perform that action at this time.
0 commit comments