diff options
author | 2024-01-23 16:18:09 -0700 | |
---|---|---|
committer | 2024-01-23 18:18:09 -0500 | |
commit | df37366556d46f7abdf82b09e33b08bd94e631b3 (patch) | |
tree | f3df548cdf291e8c150810793f1ebdf578187bc5 /packages/integrations/mdx/src/plugins.ts | |
parent | 2e58904cd44eb6a36d2b093dc3b27ee29758326b (diff) | |
download | astro-df37366556d46f7abdf82b09e33b08bd94e631b3.tar.gz astro-df37366556d46f7abdf82b09e33b08bd94e631b3.tar.zst astro-df37366556d46f7abdf82b09e33b08bd94e631b3.zip |
MDX remark image props (#9753)
* rearrange plugins and add props to Image component
* add tests and update lockfile
* add changeset
* re-rearrange plugin order, gfm/smartypants then user defined then image related then shiki/prism
* make more generic
* add more/better tests
* remove unused logger
---------
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Diffstat (limited to 'packages/integrations/mdx/src/plugins.ts')
-rw-r--r-- | packages/integrations/mdx/src/plugins.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/integrations/mdx/src/plugins.ts b/packages/integrations/mdx/src/plugins.ts index e6584aacf..2217a4da7 100644 --- a/packages/integrations/mdx/src/plugins.ts +++ b/packages/integrations/mdx/src/plugins.ts @@ -43,7 +43,7 @@ export function createMdxProcessor(mdxOptions: MdxOptions, extraOptions: MdxProc } function getRemarkPlugins(mdxOptions: MdxOptions): PluggableList { - let remarkPlugins: PluggableList = [remarkCollectImages, remarkImageToComponent]; + let remarkPlugins: PluggableList = []; if (!isPerformanceBenchmark) { if (mdxOptions.gfm) { @@ -54,7 +54,7 @@ function getRemarkPlugins(mdxOptions: MdxOptions): PluggableList { } } - remarkPlugins = [...remarkPlugins, ...mdxOptions.remarkPlugins]; + remarkPlugins = [...remarkPlugins, ...mdxOptions.remarkPlugins, remarkCollectImages, remarkImageToComponent]; if (!isPerformanceBenchmark) { // Apply syntax highlighters after user plugins to match `markdown/remark` behavior |