summaryrefslogtreecommitdiff
path: root/packages/markdown/remark/test
diff options
context:
space:
mode:
authorGravatar hippotastic <6137925+hippotastic@users.noreply.github.com> 2022-06-03 15:38:45 +0200
committerGravatar GitHub <noreply@github.com> 2022-06-03 08:38:45 -0500
commit30578015919e019cd8dd354288a45c1fc63bd01f (patch)
tree7499e464664694028acd3d17b106f00de1091df7 /packages/markdown/remark/test
parent939fe159255cecf1cab5c1b3da2670d30ac8e4a7 (diff)
downloadastro-30578015919e019cd8dd354288a45c1fc63bd01f.tar.gz
astro-30578015919e019cd8dd354288a45c1fc63bd01f.tar.zst
astro-30578015919e019cd8dd354288a45c1fc63bd01f.zip
Fix: Allow self-closing tags in Markdown (#3516)
Diffstat (limited to 'packages/markdown/remark/test')
-rw-r--r--packages/markdown/remark/test/strictness.test.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/markdown/remark/test/strictness.test.js b/packages/markdown/remark/test/strictness.test.js
new file mode 100644
index 000000000..c18cc41dd
--- /dev/null
+++ b/packages/markdown/remark/test/strictness.test.js
@@ -0,0 +1,16 @@
+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<br>like word<wbr>break and images: <img src="hi.jpg">`,
+ {}
+ );
+
+ chai.expect(code).to.equal(
+ `<p>Use self-closing void elements<br />like word<wbr />break and images: ` +
+ `<img src="hi.jpg" /></p>`
+ );
+ });
+});