diff --git a/.changeset/pink-pugs-beg.md b/.changeset/pink-pugs-beg.md new file mode 100644 index 000000000000..ee78d3d71830 --- /dev/null +++ b/.changeset/pink-pugs-beg.md @@ -0,0 +1,5 @@ +--- +'@astrojs/markdown-remark': patch +--- + +Encodes ampersand characters in code blocks diff --git a/packages/markdown/remark/src/rehype-escape.ts b/packages/markdown/remark/src/rehype-escape.ts index a32027b89e27..e776c1bb1b85 100644 --- a/packages/markdown/remark/src/rehype-escape.ts +++ b/packages/markdown/remark/src/rehype-escape.ts @@ -8,7 +8,7 @@ export default function rehypeEscape(): any { // Visit all raw children and escape HTML tags to prevent Markdown code // like "This is a `