From 76d5288aba0cfb11bf2f3d5836ba5224782fbe22 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Mon, 9 Sep 2024 11:58:55 -0700 Subject: [PATCH] apply slug after sanitize --- frontend/app/element/markdown.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/element/markdown.tsx b/frontend/app/element/markdown.tsx index 8b565f97d..612b89afe 100644 --- a/frontend/app/element/markdown.tsx +++ b/frontend/app/element/markdown.tsx @@ -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} >