File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,17 @@ function replaceHighlightTags(
66 highlightPreTag ?: string ,
77 highlightPostTag ?: string
88) : string {
9- let newHighlightValue = JSON . stringify ( value ) || ''
109 // If the value of the attribute is a string,
1110 // the highlight is applied by MeiliSearch (<em> tags)
1211 // and we replace the <em> by the expected tag for InstantSearch
13- highlightPreTag = highlightPreTag || '__ais-highlight__'
14- highlightPostTag = highlightPostTag || '__/ais-highlight__'
1512 if ( isString ( value ) ) {
16- newHighlightValue = value
13+ highlightPreTag = highlightPreTag || '__ais-highlight__'
14+ highlightPostTag = highlightPostTag || '__/ais-highlight__'
15+ return value
1716 . replace ( / < e m > / g, highlightPreTag )
1817 . replace ( / < \/ e m > / g, highlightPostTag )
1918 }
20- return newHighlightValue . toString ( )
19+ return value
2120}
2221
2322function createHighlighResult < T extends Record < string , any > > ( {
You can’t perform that action at this time.
0 commit comments