apply slug after sanitize

This commit is contained in:
Evan Simkowitz
2024-09-09 11:58:55 -07:00
parent 7c45b3679f
commit 76d5288aba
+1 -1
View File
@@ -239,7 +239,6 @@ const Markdown = ({ text, textAtom, showTocAtom, style, className, resolveOpts,
remarkPlugins={[remarkGfm, [RemarkFlexibleToc, { tocRef: tocRef.current }]]}
rehypePlugins={[
rehypeRaw,
() => rehypeSlug({ prefix: idPrefix }),
rehypeHighlight,
() =>
rehypeSanitize({
@@ -256,6 +255,7 @@ const Markdown = ({ text, textAtom, showTocAtom, style, className, resolveOpts,
},
tagNames: [...(defaultSchema.tagNames || []), "span"],
}),
() => rehypeSlug({ prefix: idPrefix }),
]}
components={markdownComponents}
>