fix: LaTex formula render issue (#3353)
This commit is contained in:
parent
6dd387db2b
commit
3b2c84c4fe
@ -2,6 +2,7 @@ import { PropsWithChildren } from 'react'
|
||||
|
||||
import { Metadata } from 'next'
|
||||
|
||||
import 'katex/dist/katex.min.css'
|
||||
import '@/styles/main.scss'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
|
||||
@ -7,7 +7,7 @@ import hljs from 'highlight.js'
|
||||
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { FolderOpenIcon } from 'lucide-react'
|
||||
import { Marked, Renderer } from 'marked'
|
||||
import { Marked, MarkedOptions, Renderer } from 'marked'
|
||||
import { markedHighlight } from 'marked-highlight'
|
||||
import markedKatex from 'marked-katex-extension'
|
||||
|
||||
@ -86,6 +86,8 @@ const SimpleTextMessage: React.FC<Props> = ({
|
||||
},
|
||||
}),
|
||||
{
|
||||
gfm: true,
|
||||
breaks: true,
|
||||
renderer: {
|
||||
link: (href, title, text) =>
|
||||
Renderer.prototype.link
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user