fix(UI/markdown): markdown not recognized ** as emphasis marks in CJK (#4119)

This commit is contained in:
fullex
2025-03-29 23:56:41 +08:00
committed by GitHub
parent ad2fba10cd
commit df673beadd
3 changed files with 53 additions and 2 deletions
@@ -14,6 +14,7 @@ import rehypeKatex from 'rehype-katex'
// @ts-ignore next-line
import rehypeMathjax from 'rehype-mathjax'
import rehypeRaw from 'rehype-raw'
import remarkCjkFriendly from 'remark-cjk-friendly'
import remarkGfm from 'remark-gfm'
import remarkMath from 'remark-math'
@@ -80,7 +81,7 @@ const Markdown: FC<Props> = ({ message, citationsData }) => {
return (
<ReactMarkdown
rehypePlugins={rehypePlugins}
remarkPlugins={[remarkMath, remarkGfm]}
remarkPlugins={[remarkMath, remarkGfm, remarkCjkFriendly]}
className="markdown"
components={components()}
disallowedElements={['iframe']}