fix: model markdown parse failed

This commit is contained in:
jialin
2024-11-22 11:55:19 +08:00
parent 67febd3e25
commit c8c22b3f22
15 changed files with 514 additions and 50 deletions
+8 -11
View File
@@ -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>
)
</>
);
};