Skip to content

Commit 3aaf576

Browse files
committed
fix: remove rehype-sanitize dependency.
1 parent 473cbca commit 3aaf576

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"@babel/runtime": "7.13.10",
4848
"@types/prismjs": "1.16.4",
4949
"prismjs": "1.23.0",
50-
"rehype-sanitize": "4.0.0",
5150
"rehype-raw": "5.1.0",
5251
"remark-gfm": "1.0.0",
5352
"react-markdown": "6.0.1"

src/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React, { useEffect, useImperativeHandle } from 'react';
22
import ReactMarkdown from 'react-markdown';
33
import gfm from 'remark-gfm';
44
import rehypeRaw from 'rehype-raw';
5-
import rehypeSanitize from 'rehype-sanitize';
65
import Prism from 'prismjs';
76
import 'prismjs/components/prism-markup';
87
import { loadLang } from './langs';
@@ -58,7 +57,7 @@ export default React.forwardRef<MarkdownPreviewRef, MarkdownPreviewProps>((props
5857
<ReactMarkdown
5958
{...other}
6059
plugins={[gfm, ...(other.plugins || [])]}
61-
rehypePlugins={[rehypeRaw, rehypeSanitize, ...(other.rehypePlugins || [])]}
60+
rehypePlugins={[rehypeRaw, ...(other.rehypePlugins || [])]}
6261
>
6362
{source || ''}
6463
</ReactMarkdown>

0 commit comments

Comments
 (0)