File tree 3 files changed +9
-7
lines changed
3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ export function DocsHeader({
32
32
} ) {
33
33
let pathname = usePathname ( )
34
34
35
- let section = flatNavigation . find ( ( section ) =>
36
- section . links ?. find ( ( link ) => link . href === pathname ) ,
35
+ let section = flatNavigation . find (
36
+ ( section ) => section . links ?. find ( ( link ) => link . href === pathname ) ,
37
37
)
38
38
39
39
if ( ! title && ! section ) {
Original file line number Diff line number Diff line change @@ -162,8 +162,9 @@ function SearchResult({
162
162
let id = useId ( )
163
163
let pathname = usePathname ( )
164
164
165
- let sectionTitle = flatNavigation . find ( ( section ) =>
166
- section . links ?. find ( ( link ) => link . href === result . url . split ( '#' ) [ 0 ] ) ,
165
+ let sectionTitle = flatNavigation . find (
166
+ ( section ) =>
167
+ section . links ?. find ( ( link ) => link . href === result . url . split ( '#' ) [ 0 ] ) ,
167
168
) ?. title
168
169
let hierarchy = [ sectionTitle , result . pageTitle ] . filter (
169
170
( x ) : x is string => typeof x === 'string' ,
Original file line number Diff line number Diff line change @@ -61,9 +61,10 @@ export default function withSearch(nextConfig = {}) {
61
61
62
62
let sections
63
63
let ast = Markdoc . parse ( md )
64
- let keywords = ast . attributes ?. frontmatter ?. match (
65
- / ^ k e y w o r d s : \s * ( .* ?) \s * $ / m,
66
- ) ?. [ 1 ] . split ( / , \s + / ) || [ ]
64
+ let keywords =
65
+ ast . attributes ?. frontmatter
66
+ ?. match ( / ^ k e y w o r d s : \s * ( .* ?) \s * $ / m) ?. [ 1 ]
67
+ . split ( / , \s + / ) || [ ]
67
68
68
69
if ( cache . get ( file ) ?. [ 0 ] === md ) {
69
70
sections = cache . get ( file ) [ 1 ]
You can’t perform that action at this time.
0 commit comments