[ci] format
This commit is contained in:
parent
16034f0dd5
commit
e7bee22d18
2 changed files with 5 additions and 8 deletions
|
@ -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, '<').replace(/>/g, '>');
|
||||
|
|
|
@ -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\`\`\``,
|
||||
{
|
||||
isAstroFlavoredMd: true,
|
||||
syntaxHighlight: false,
|
||||
}
|
||||
);
|
||||
const { code } = await renderMarkdown(`\`\`\`astro\n<h1>{x && x.name || ''}!</h1>\n\`\`\``, {
|
||||
isAstroFlavoredMd: true,
|
||||
syntaxHighlight: false,
|
||||
});
|
||||
|
||||
expect(code).to.equal(
|
||||
`<pre is:raw><code class="language-astro"><h1>{x && x.name || ''}!</h1>\n</code></pre>`
|
||||
|
|
Loading…
Reference in a new issue