fix: LaTeX cannot render properly (#387)
This commit is contained in:
+9
-1
@@ -178,7 +178,15 @@
|
||||
}
|
||||
|
||||
.prose .math {
|
||||
@apply max-w-full inline-block overflow-x-scroll;
|
||||
@apply max-w-full;
|
||||
}
|
||||
|
||||
.prose .katex {
|
||||
@apply overflow-x-auto;
|
||||
}
|
||||
|
||||
.prose .katex-html {
|
||||
@apply py-2;
|
||||
}
|
||||
|
||||
.xlog-comment .prose {
|
||||
|
||||
@@ -108,7 +108,6 @@ export const renderPageContent = (
|
||||
.use(remarkMermaid)
|
||||
.use(remarkMath)
|
||||
.use(remarkRehype, { allowDangerousHtml: true })
|
||||
.use(rehypeKatex) // There may be $ symbol parsing errors
|
||||
.use(rehypeStringify)
|
||||
.use(rehypeRaw)
|
||||
.use(rehypeImage, { env })
|
||||
@@ -142,10 +141,6 @@ export const renderPageContent = (
|
||||
},
|
||||
})
|
||||
.use(rehypeSanitize, sanitizeScheme)
|
||||
.use(rehypePrism, {
|
||||
ignoreMissing: true,
|
||||
showLineNumbers: true,
|
||||
})
|
||||
.use(rehypeTable)
|
||||
.use(rehypeExternalLink)
|
||||
.use(rehypeWrapCode)
|
||||
@@ -183,6 +178,11 @@ export const renderPageContent = (
|
||||
}
|
||||
},
|
||||
})
|
||||
.use(rehypePrism, {
|
||||
ignoreMissing: true,
|
||||
showLineNumbers: true,
|
||||
})
|
||||
.use(rehypeKatex) // There may be $ symbol parsing errors
|
||||
.use(html ? () => (tree: any) => {} : rehypeReact, {
|
||||
createElement: createElement,
|
||||
components: {
|
||||
|
||||
Reference in New Issue
Block a user