Skip to content

Commit f288d7e

Browse files
committed
fix formatting
1 parent f9e6c88 commit f288d7e

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/components/DocsHeader.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export function DocsHeader({
3232
}) {
3333
let pathname = usePathname()
3434

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),
3737
)
3838

3939
if (!title && !section) {

src/components/Search.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,9 @@ function SearchResult({
162162
let id = useId()
163163
let pathname = usePathname()
164164

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]),
167168
)?.title
168169
let hierarchy = [sectionTitle, result.pageTitle].filter(
169170
(x): x is string => typeof x === 'string',

src/markdoc/search.mjs

+4-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ export default function withSearch(nextConfig = {}) {
6161

6262
let sections
6363
let ast = Markdoc.parse(md)
64-
let keywords = ast.attributes?.frontmatter?.match(
65-
/^keywords:\s*(.*?)\s*$/m,
66-
)?.[1].split(/,\s+/) || []
64+
let keywords =
65+
ast.attributes?.frontmatter
66+
?.match(/^keywords:\s*(.*?)\s*$/m)?.[1]
67+
.split(/,\s+/) || []
6768

6869
if (cache.get(file)?.[0] === md) {
6970
sections = cache.get(file)[1]

0 commit comments

Comments
 (0)