diff options
author | 2022-05-30 18:18:33 +0200 | |
---|---|---|
committer | 2022-05-30 12:18:33 -0400 | |
commit | 429b65d60bb64973f1e5867cc58f1fe07bada952 (patch) | |
tree | e6e144eb3817967dfcf3886f86cf8bf1a9da2e12 /packages/astro/test/astro-markdown.test.js | |
parent | 95c506bf6b8f97a7406ccea25ebcb6a6bc66907c (diff) | |
download | astro-429b65d60bb64973f1e5867cc58f1fe07bada952.tar.gz astro-429b65d60bb64973f1e5867cc58f1fe07bada952.tar.zst astro-429b65d60bb64973f1e5867cc58f1fe07bada952.zip |
Fix `*/` breaking HTML comments in Markdown (#3477)
Diffstat (limited to '')
-rw-r--r-- | packages/astro/test/astro-markdown.test.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/astro/test/astro-markdown.test.js b/packages/astro/test/astro-markdown.test.js index ecd6074ec..181ca56e9 100644 --- a/packages/astro/test/astro-markdown.test.js +++ b/packages/astro/test/astro-markdown.test.js @@ -72,6 +72,13 @@ describe('Astro Markdown', () => { expect($('h1').text()).to.equal('It works!'); }); + it('Prevents `*/` sequences from breaking HTML comments (#3476)', async () => { + const html = await fixture.readFile('/comment-with-js/index.html'); + const $ = cheerio.load(html); + + expect($('h1').text()).to.equal('It still works!'); + }); + // https://github.com/withastro/astro/issues/3254 it('Can handle scripts in markdown pages', async () => { const html = await fixture.readFile('/script/index.html'); |