diff options
author | 2022-08-10 23:10:06 +0200 | |
---|---|---|
committer | 2022-08-10 17:10:06 -0400 | |
commit | 869d0093596b709cfcc1a1a95ee631b48d6d1c26 (patch) | |
tree | 5ef95e15f5091fcf2bbb692fed25e0c26c1884e4 /packages/integrations/mdx/src | |
parent | d087286daa58673399781d54a5b426ae4fd88730 (diff) | |
download | astro-869d0093596b709cfcc1a1a95ee631b48d6d1c26.tar.gz astro-869d0093596b709cfcc1a1a95ee631b48d6d1c26.tar.zst astro-869d0093596b709cfcc1a1a95ee631b48d6d1c26.zip |
Mdx/plugin unshift (#4248)astro@1.0.2@astrojs/preact@1.0.1@astrojs/mdx@0.8.2@astrojs/cloudflare@1.0.1
* Add builtin rehype plugin to beginning
* Add Changeset
* Do the same to rehypeRaw for consistency
Diffstat (limited to 'packages/integrations/mdx/src')
-rw-r--r-- | packages/integrations/mdx/src/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts index d88e67016..05b803705 100644 --- a/packages/integrations/mdx/src/index.ts +++ b/packages/integrations/mdx/src/index.ts @@ -62,10 +62,10 @@ 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.push(rehypeCollectHeadings); + rehypePlugins.unshift(rehypeCollectHeadings); return rehypePlugins; } |