import { renderMarkdown } from '../dist/index.js'; import chai from 'chai'; describe('strictness', () => { it('should allow self-closing HTML tags (void elements)', async () => { const { code } = await renderMarkdown( `Use self-closing void elements
like wordbreak and images: `, {} ); chai .expect(code) .to.equal( `

Use self-closing void elements
like wordbreak and images: ` + `

` ); }); it('should allow attribute names starting with ":" after element names', async () => { const { code } = await renderMarkdown(`
Test
`, {}); chai.expect(code.trim()).to.equal(`
Test
`); }); it('should allow attribute names starting with ":" after local element names', async () => { const { code } = await renderMarkdown(`x`, {}); chai.expect(code.trim()).to.equal(`x`); }); it('should allow attribute names starting with ":" after attribute names', async () => { const { code } = await renderMarkdown(``, {}); chai.expect(code.trim()).to.equal(``); }); it('should allow attribute names starting with ":" after local attribute names', async () => { const { code } = await renderMarkdown( ``, {} ); chai.expect(code.trim()).to.equal(``); }); it('should allow attribute names starting with ":" after attribute values', async () => { const { code } = await renderMarkdown(``, {}); chai.expect(code.trim()).to.equal(``); }); it('should allow attribute names starting with "@" after element names', async () => { const { code } = await renderMarkdown(``, {}); chai.expect(code.trim()).to.equal(``); }); it('should allow attribute names starting with "@" after local element names', async () => { const { code } = await renderMarkdown( `Test`, {} ); chai.expect(code.trim()).to.equal(`Test`); }); it('should allow attribute names starting with "@" after attribute names', async () => { const { code } = await renderMarkdown( ``, {} ); chai.expect(code.trim()).to.equal(``); }); it('should allow attribute names starting with "@" after local attribute names', async () => { const { code } = await renderMarkdown( ``, {} ); chai.expect(code.trim()).to.equal(``); }); it('should allow attribute names starting with "@" after attribute values', async () => { const { code } = await renderMarkdown( ``, {} ); chai.expect(code.trim()).to.equal(``); }); it('should allow attribute names containing dots', async () => { const { code } = await renderMarkdown(``, {}); chai.expect(code.trim()).to.equal(``); }); });