summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/src
diff options
context:
space:
mode:
authorGravatar Jakob Helgesson <jakob.helgesson@gmail.com> 2022-08-10 23:10:06 +0200
committerGravatar GitHub <noreply@github.com> 2022-08-10 17:10:06 -0400
commit869d0093596b709cfcc1a1a95ee631b48d6d1c26 (patch)
tree5ef95e15f5091fcf2bbb692fed25e0c26c1884e4 /packages/integrations/mdx/src
parentd087286daa58673399781d54a5b426ae4fd88730 (diff)
downloadastro-869d0093596b709cfcc1a1a95ee631b48d6d1c26.tar.gz
astro-869d0093596b709cfcc1a1a95ee631b48d6d1c26.tar.zst
astro-869d0093596b709cfcc1a1a95ee631b48d6d1c26.zip
* 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.ts4
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;
}