fix: Fix {name} does not correspond to supportd language and throw an error.

This commit is contained in:
jaywcjlove
2023-08-22 17:44:56 +08:00
parent ad546bfb6c
commit 8bf24877bf

View File

@@ -32,7 +32,9 @@ export function markdownToHTML(md: string, css: string, opts: MarkdownToHTMLOpti
.use(remarkParse) .use(remarkParse)
.use(remarkGfm) .use(remarkGfm)
.use(remarkRehype, { allowDangerousHtml: true }) .use(remarkRehype, { allowDangerousHtml: true })
.use(rehypePrism) .use(rehypePrism, {
ignoreMissing: true,
})
.use(rehypeRaw) .use(rehypeRaw)
.use(rehypeIgnore, {}) .use(rehypeIgnore, {})
.use(rehypeAttrs, { properties: 'attr' }) .use(rehypeAttrs, { properties: 'attr' })