From fa02b694651f6f8f43857a474235226509f7e936 Mon Sep 17 00:00:00 2001 From: Svemat01 Date: Wed, 10 Aug 2022 22:04:06 +0200 Subject: [PATCH] Do the same to rehypeRaw for consistency --- packages/integrations/mdx/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts index 4e8b4a25c404..05b80370568e 100644 --- a/packages/integrations/mdx/src/index.ts +++ b/packages/integrations/mdx/src/index.ts @@ -62,7 +62,7 @@ function getRehypePlugins( let rehypePlugins = handleExtends(mdxOptions.rehypePlugins, DEFAULT_REHYPE_PLUGINS); if (config.markdown.syntaxHighlight === 'shiki' || config.markdown.syntaxHighlight === 'prism') { - rehypePlugins.push([rehypeRaw, { passThrough: nodeTypes }]); + rehypePlugins.unshift([rehypeRaw, { passThrough: nodeTypes }]); } // getHeadings() is guaranteed by TS, so we can't allow user to override rehypePlugins.unshift(rehypeCollectHeadings);