From e7bee22d18c6f1299d99793da9bea00915d144a4 Mon Sep 17 00:00:00 2001 From: hippotastic Date: Fri, 5 Aug 2022 14:24:50 +0000 Subject: [PATCH] [ci] format --- packages/markdown/remark/src/rehype-escape.ts | 2 +- packages/markdown/remark/test/entities.test.js | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/markdown/remark/src/rehype-escape.ts b/packages/markdown/remark/src/rehype-escape.ts index b0a4cb923..a4cc32cf7 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 dff844329..b7d551d72 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

{x && x.name || ''}!

\n\`\`\``, - { - isAstroFlavoredMd: true, - syntaxHighlight: false, - } - ); + const { code } = await renderMarkdown(`\`\`\`astro\n

{x && x.name || ''}!

\n\`\`\``, { + isAstroFlavoredMd: true, + syntaxHighlight: false, + }); expect(code).to.equal( `
<h1>{x && x.name || ''}!</h1>\n
`