diff options
author | 2023-04-13 11:54:40 +0200 | |
---|---|---|
committer | 2023-04-13 11:54:40 +0200 | |
commit | 2511d58d586af080a78e5ef8a63020b3e17770db (patch) | |
tree | 1afdd2bd6e1cffb4d321a6a27f1b7e11233f8363 /packages/markdown/remark/src/index.ts | |
parent | 948a6d7be0c76fd1dd8550270bd29821075f799c (diff) | |
download | astro-2511d58d586af080a78e5ef8a63020b3e17770db.tar.gz astro-2511d58d586af080a78e5ef8a63020b3e17770db.tar.zst astro-2511d58d586af080a78e5ef8a63020b3e17770db.zip |
feat(mdx): Add support for turning ![]() into <Image> (#6824)
Diffstat (limited to 'packages/markdown/remark/src/index.ts')
-rw-r--r-- | packages/markdown/remark/src/index.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/markdown/remark/src/index.ts b/packages/markdown/remark/src/index.ts index f37b9ed68..0a21e1c98 100644 --- a/packages/markdown/remark/src/index.ts +++ b/packages/markdown/remark/src/index.ts @@ -8,7 +8,7 @@ import type { import { toRemarkInitializeAstroData } from './frontmatter-injection.js'; import { loadPlugins } from './load-plugins.js'; import { rehypeHeadingIds } from './rehype-collect-headings.js'; -import toRemarkCollectImages from './remark-collect-images.js'; +import { remarkCollectImages } from './remark-collect-images.js'; import remarkPrism from './remark-prism.js'; import scopedStyles from './remark-scoped-styles.js'; import remarkShiki from './remark-shiki.js'; @@ -24,6 +24,7 @@ import { VFile } from 'vfile'; import { rehypeImages } from './rehype-images.js'; export { rehypeHeadingIds } from './rehype-collect-headings.js'; +export { remarkCollectImages } from './remark-collect-images.js'; export * from './types.js'; export const markdownConfigDefaults: Omit<Required<AstroMarkdownOptions>, 'drafts'> = { @@ -96,7 +97,7 @@ export async function renderMarkdown( if (opts.experimentalAssets) { // Apply later in case user plugins resolve relative image paths - parser.use([toRemarkCollectImages()]); + parser.use([remarkCollectImages]); } } |