fix: toc href not match id (#575)

This commit is contained in:
Birdgg 2023-05-23 20:13:44 +08:00 committed by GitHub
parent 325a605dc2
commit af932ee8dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -124,9 +124,6 @@ export const renderPageContent = (
}
}
})
.use(() => (tree) => {
env.toc = toc(tree, { tight: true, ordered: true })
})
.use(remarkGfm, {
singleTilde: false,
})
@ -139,6 +136,9 @@ export const renderPageContent = (
singleDollarTextMath: false,
})
.use(remarkPangu)
.use(() => (tree) => {
env.toc = toc(tree, { tight: true, ordered: true })
})
.use(remarkRehype, { allowDangerousHtml: true })
.use(emoji)