Skip to content

Commit

Permalink
fix: LaTex formula render issue (#3353)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan authored Aug 13, 2024
1 parent 6dd387d commit 3b2c84c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions web/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Check warning on line 10 in web/screens/Thread/ThreadCenterPanel/SimpleTextMessage/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-ubuntu

'MarkedOptions' is defined but never used

Check warning on line 10 in web/screens/Thread/ThreadCenterPanel/SimpleTextMessage/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-macos

'MarkedOptions' is defined but never used

Check warning on line 10 in web/screens/Thread/ThreadCenterPanel/SimpleTextMessage/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-windows (default-windows-security)

'MarkedOptions' is defined but never used

Check warning on line 10 in web/screens/Thread/ThreadCenterPanel/SimpleTextMessage/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-windows (bit-defender)

'MarkedOptions' is defined but never used
import { markedHighlight } from 'marked-highlight'
import markedKatex from 'marked-katex-extension'

Expand Down Expand Up @@ -86,6 +86,8 @@ const SimpleTextMessage: React.FC<Props> = ({
},
}),
{
gfm: true,
breaks: true,
renderer: {
link: (href, title, text) =>
Renderer.prototype.link
Expand Down

0 comments on commit 3b2c84c

Please sign in to comment.