mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-21 21:36:42 +08:00
### What problem does this PR solve? [remarkjs/react-markdown/issues/785](https://github.com/remarkjs/react-markdown/issues/785) Fix: Fixed an issue where math formulas could not be displayed correctly #4405 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -8,6 +8,7 @@ import remarkMath from 'remark-math';
|
||||
|
||||
import 'katex/dist/katex.min.css'; // `rehype-katex` does not import the CSS for you
|
||||
|
||||
import { preprocessLaTeX } from '@/utils/chat';
|
||||
import styles from './index.less';
|
||||
|
||||
const HightLightMarkdown = ({
|
||||
@ -43,7 +44,7 @@ const HightLightMarkdown = ({
|
||||
} as any
|
||||
}
|
||||
>
|
||||
{children}
|
||||
{children ? preprocessLaTeX(children) : children}
|
||||
</Markdown>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user