Skip to content

Commit

Permalink
fix: fix the issue with the loading order of rehypePlugins. #259
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 6, 2024
1 parent 5621374 commit 268537f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export default React.forwardRef<MarkdownPreviewRef, MarkdownPreviewProps>((props
reservedMeta,
rehypeRaw,
retrieveMeta,
[rehypePrism, { ignoreMissing: true }],
...defaultRehypePlugins,
[rehypeRewrite, { rewrite: rehypeRewriteHandle(props.disableCopy ?? false, props.rehypeRewrite) }],
[rehypeAttrs, { properties: 'attr' }],
...(props.rehypePlugins || []),
[rehypePrism, { ignoreMissing: true }],
];
return <MarkdownPreview {...props} rehypePlugins={rehypePlugins} ref={ref} />;
});

0 comments on commit 268537f

Please sign in to comment.