diff options
Diffstat (limited to '')
-rw-r--r-- | .changeset/five-phones-notice.md | 5 | ||||
-rw-r--r-- | packages/astro/src/vite-plugin-markdown/index.ts | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/five-phones-notice.md b/.changeset/five-phones-notice.md new file mode 100644 index 000000000..7973ac611 --- /dev/null +++ b/.changeset/five-phones-notice.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix parsing image assets from a Markdown line along with other markup. diff --git a/packages/astro/src/vite-plugin-markdown/index.ts b/packages/astro/src/vite-plugin-markdown/index.ts index fcdaf04ea..3d8202422 100644 --- a/packages/astro/src/vite-plugin-markdown/index.ts +++ b/packages/astro/src/vite-plugin-markdown/index.ts @@ -147,7 +147,7 @@ export default function markdown({ settings, logging }: AstroPluginOptions): Plu function updateImageReferences(html) { return html.replaceAll( - /__ASTRO_IMAGE_=\"(.+)\"/gm, + /__ASTRO_IMAGE_="([^"]+)"/gm, (full, imagePath) => spreadAttributes({src: images[imagePath].src, ...images[imagePath].attributes}) ); } |