Closed bluwy closed 1 week ago
Latest commit: 93d068a855fe0aafb822950ad86fe54ddc041f84
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Changes
fix https://github.com/withastro/astro/issues/11291
The markdown vfile
data.imagePaths
now contains decoded paths instead of possibly-encoded paths. I'm not sure if this is ideal/intentional for the option itself, but this top-level change helps align all downstream usage:https://github.com/withastro/astro/blob/93d068a855fe0aafb822950ad86fe54ddc041f84/packages/astro/src/vite-plugin-markdown/images.ts#L6-L8
rehypeImageToComponent
currently compares with decoded paths, the generated imports are also decoded:https://github.com/withastro/astro/blob/93d068a855fe0aafb822950ad86fe54ddc041f84/packages/integrations/mdx/src/rehype-images-to-component.ts#L84-L86
rehype-images
is also comparing with decoded paths:https://github.com/withastro/astro/blob/93d068a855fe0aafb822950ad86fe54ddc041f84/packages/markdown/remark/src/rehype-images.ts#L14-L16
https://github.com/withastro/astro/blob/93d068a855fe0aafb822950ad86fe54ddc041f84/packages/astro/src/vite-plugin-markdown/images.ts#L12-L20
So with the above discoveries, I made this PR change instead of keeping
imagePaths
encoded only.Testing
Added new tests
Docs
n/a. bug fix.