mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-04 18:59:08 +01:00
apply slug after sanitize
This commit is contained in:
parent
7c45b3679f
commit
76d5288aba
@ -239,7 +239,6 @@ const Markdown = ({ text, textAtom, showTocAtom, style, className, resolveOpts,
|
|||||||
remarkPlugins={[remarkGfm, [RemarkFlexibleToc, { tocRef: tocRef.current }]]}
|
remarkPlugins={[remarkGfm, [RemarkFlexibleToc, { tocRef: tocRef.current }]]}
|
||||||
rehypePlugins={[
|
rehypePlugins={[
|
||||||
rehypeRaw,
|
rehypeRaw,
|
||||||
() => rehypeSlug({ prefix: idPrefix }),
|
|
||||||
rehypeHighlight,
|
rehypeHighlight,
|
||||||
() =>
|
() =>
|
||||||
rehypeSanitize({
|
rehypeSanitize({
|
||||||
@ -256,6 +255,7 @@ const Markdown = ({ text, textAtom, showTocAtom, style, className, resolveOpts,
|
|||||||
},
|
},
|
||||||
tagNames: [...(defaultSchema.tagNames || []), "span"],
|
tagNames: [...(defaultSchema.tagNames || []), "span"],
|
||||||
}),
|
}),
|
||||||
|
() => rehypeSlug({ prefix: idPrefix }),
|
||||||
]}
|
]}
|
||||||
components={markdownComponents}
|
components={markdownComponents}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user