diff --git a/core/src/nohighlight.tsx b/core/src/nohighlight.tsx index 16b5a9cc..d3f895c7 100644 --- a/core/src/nohighlight.tsx +++ b/core/src/nohighlight.tsx @@ -3,7 +3,6 @@ import MarkdownPreview from './preview'; import { type PluggableList } from 'unified'; import rehypeRewrite from 'rehype-rewrite'; import rehypeAttrs from 'rehype-attr'; -import rehypeRaw from 'rehype-raw'; import { reservedMeta } from './plugins/reservedMeta'; import { retrieveMeta } from './plugins/retrieveMeta'; import { rehypeRewriteHandle, defaultRehypePlugins } from './rehypePlugins'; @@ -14,7 +13,6 @@ export * from './Props'; export default React.forwardRef((props, ref) => { const rehypePlugins: PluggableList = [ reservedMeta, - rehypeRaw, retrieveMeta, ...defaultRehypePlugins, [rehypeRewrite, { rewrite: rehypeRewriteHandle(props.disableCopy ?? false, props.rehypeRewrite) }], diff --git a/core/src/preview.tsx b/core/src/preview.tsx index f195d804..ba8481de 100644 --- a/core/src/preview.tsx +++ b/core/src/preview.tsx @@ -43,7 +43,7 @@ export default React.forwardRef((props return /^[A-Za-z0-9]+$/.test(element.tagName); }, }; - if (skipHtml) { + if (!skipHtml) { rehypePlugins.push(raw); } const remarkPlugins = [remarkAlert, ...(other.remarkPlugins || []), gfm]; @@ -53,7 +53,7 @@ export default React.forwardRef((props