File tree Expand file tree Collapse file tree 1 file changed +1
-28
lines changed Expand file tree Collapse file tree 1 file changed +1
-28
lines changed Original file line number Diff line number Diff line change 11( function ( global , doc ) {
2- const getClearedItem = ( item ) => {
3- const REMOVED_PATTERN = '¶' ;
4- const hierarchy = Object . entries ( item . hierarchy ) . reduce ( ( output , [ hierarchyIndex , hierarchy ] ) => {
5- return {
6- ...output ,
7- [ hierarchyIndex ] : hierarchy ?. replace ( REMOVED_PATTERN , '' ) ?? null ,
8- } ;
9- } , { } ) ;
10- const highlightResultHierarchy = Object . entries ( item . _highlightResult . hierarchy ) . reduce ( ( output , [ hierarchyIndex , hierarchy ] ) => {
11- return {
12- ...output ,
13- [ hierarchyIndex ] : {
14- ...hierarchy ,
15- value : hierarchy ?. value . replace ( REMOVED_PATTERN , '' ) ?? null ,
16- } ,
17- } ;
18- } , { } ) ;
19-
20- return {
21- ...item ,
22- hierarchy,
23- _highlightResult : {
24- ...item . _highlightResult ,
25- hierarchy : highlightResultHierarchy ,
26- } ,
27- }
28- }
29- let match = null ;
2+ let match ;
303 const search_query = ( match = doc . location . search . match ( / s q = ( .* ?) ( & | $ ) / ) ) ? match [ 1 ] : '' ;
314 const parsed_search_query = decodeURI ( search_query . replace ( '+' , ' ' ) ) ;
325 const search_page = ( match = doc . location . search . match ( / p = ( \d * ?) ( & | $ ) / ) ) ? match [ 1 ] : 1 ;
You can’t perform that action at this time.
0 commit comments