Skip to content

Commit dd61122

Browse files
committed
fix: fix gfm errors.
1 parent 44019f3 commit dd61122

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,13 @@ export default React.forwardRef<MarkdownPreviewRef, MarkdownPreviewProps>((props
6161
const { className, source, style, onScroll, onMouseOver, warpperElement = {}, ...other } = props || {};
6262
const mdp = React.createRef<HTMLDivElement>();
6363
useImperativeHandle(ref, () => ({ ...props, mdp }), [mdp, props]);
64-
6564
const cls = `wmde-markdown wmde-markdown-color ${className || ''}`;
6665
return (
6766
<div ref={mdp} onScroll={onScroll} onMouseOver={onMouseOver} {...warpperElement} className={cls} style={style}>
6867
<ReactMarkdown
6968
{...other}
70-
plugins={[gfm, ...(other.plugins || [])]}
7169
rehypePlugins={[[rehypePrism, { ignoreMissing: true }], [rehypeRewrite, rehypeRewriteHandle], rehypeRaw, ...(other.rehypePlugins || [])]}
72-
remarkPlugins={[ slug, headings, ...(other.remarkPlugins || []) ]}
70+
remarkPlugins={[ slug, headings, ...(other.remarkPlugins || []), gfm ]}
7371
children={source || ''}
7472
/>
7573
</div>

0 commit comments

Comments
 (0)