File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,28 @@ const transformHits = (hits) => {
24
24
const path = hit . url . replace ( "https://platform.text.com/docs" , "" ) ;
25
25
const url = window . location . origin + pathExt + path ;
26
26
27
+ const updatedSnippetResult = hit . _snippetResult
28
+ ? {
29
+ ...hit . _snippetResult ,
30
+ hierarchy : Object . fromEntries (
31
+ Object . entries (
32
+ hit . _snippetResult . hierarchy || { }
33
+ ) . map ( ( [ key , value ] ) => [
34
+ key ,
35
+ value . matchLevel === "none"
36
+ ? { ...value , value : content }
37
+ : value ,
38
+ ] )
39
+ ) ,
40
+ }
41
+ : hit . _snippetResult ;
42
+
27
43
if ( content )
28
44
return {
29
45
...hit ,
30
46
content : content ,
31
47
url,
48
+ _snippetResult : updatedSnippetResult ,
32
49
} ;
33
50
34
51
return {
Original file line number Diff line number Diff line change @@ -708,6 +708,7 @@ const UNCLEAR_SEARCH_MATCHES = [
708
708
content : "Configuration API" ,
709
709
} ,
710
710
{ regex : / d a t a - r e p o r t i n g / g, content : "Reports API" } ,
711
+ { regex : / c u s t o m e r - s d k / g, content : "Customer SDK" } ,
711
712
] ;
712
713
713
714
const constants = {
You can’t perform that action at this time.
0 commit comments