fix: model markdown parse failed
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { isHTMLDocumentString } from '@/utils';
|
||||
import { EyeOutlined } from '@ant-design/icons';
|
||||
import { Checkbox, Image, Typography } from 'antd';
|
||||
import { unescape } from 'lodash';
|
||||
@@ -200,16 +199,14 @@ const MarkdownViewer: React.FC<MarkdownViewerProps> = ({
|
||||
|
||||
return (
|
||||
<>
|
||||
{isHTMLDocumentString(content) ? (
|
||||
<div dangerouslySetInnerHTML={{ __html: content }} style={{ height }} />
|
||||
) : (
|
||||
<div
|
||||
style={{ height }}
|
||||
className="markdown-viewer custom-scrollbar-horizontal"
|
||||
>
|
||||
{renderTokens(tokens)}
|
||||
</div>
|
||||
)}
|
||||
(
|
||||
<div
|
||||
style={{ height }}
|
||||
className="markdown-viewer custom-scrollbar-horizontal"
|
||||
>
|
||||
{renderTokens(tokens)}
|
||||
</div>
|
||||
)
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user