diff --git a/packages/markdown/remark/src/rehype-escape.ts b/packages/markdown/remark/src/rehype-escape.ts index b0a4cb923f..a4cc32cf72 100644 --- a/packages/markdown/remark/src/rehype-escape.ts +++ b/packages/markdown/remark/src/rehype-escape.ts @@ -1,4 +1,4 @@ -import { visit, SKIP } from 'unist-util-visit'; +import { SKIP, visit } from 'unist-util-visit'; export function escapeEntities(value: string): string { return value.replace(/&/g, '&').replace(//g, '>'); diff --git a/packages/markdown/remark/test/entities.test.js b/packages/markdown/remark/test/entities.test.js index dff8443291..b7d551d725 100644 --- a/packages/markdown/remark/test/entities.test.js +++ b/packages/markdown/remark/test/entities.test.js @@ -11,13 +11,10 @@ describe('entities', () => { }); it('should not escape entities in code blocks twice in Astro-flavored markdown', async () => { - const { code } = await renderMarkdown( - `\`\`\`astro\n
<h1>{x && x.name || ''}!</h1>\n
`