File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/react-pages/src/node/virtual-module-plugins/outline-info-module Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change
1
+ import type { Root } from 'remark-mdx'
2
+
1
3
// collect headings
2
4
// ref: https://github.com/syntax-tree/mdast-util-toc/blob/ba8f680a3cbcd96351febe2b73edb21598720945/lib/search.js#L67
3
5
@@ -10,7 +12,7 @@ export async function extractOutlineInfo(md: string) {
10
12
const { toString } = await import ( 'mdast-util-to-string' )
11
13
const { default : Slugger } = await import ( 'github-slugger' )
12
14
13
- const ast = remark ( ) . use ( frontmatter ) . use ( gfm ) . use ( remarkMdx ) . parse ( md )
15
+ const ast : Root = remark ( ) . use ( frontmatter ) . use ( gfm ) . use ( remarkMdx ) . parse ( md )
14
16
const slugs = new Slugger ( )
15
17
const headings : { depth : number ; text : string ; id : string } [ ] = [ ]
16
18
You can’t perform that action at this time.
0 commit comments