We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11d1cc7 commit 3835bacCopy full SHA for 3835bac
test/index.test.mjs
@@ -182,4 +182,11 @@ describe('htm', () => {
182
html`<a ...${obj} b="1" />`;
183
expect(obj).toEqual({});
184
});
185
+
186
+ test('ignore HTML comments', () => {
187
+ expect(html`<a><!-- Hello, world! --></a>`).toEqual(h('a', null));
188
+ expect(html`<a><!-- Hello,\nworld! --></a>`).toEqual(h('a', null));
189
+ expect(html`<a><!-- ${'Hello, world!'} --></a>`).toEqual(h('a', null));
190
+ expect(html`<a><!--> Hello, world <!--></a>`).toEqual(h('a', null));
191
+ });
192
0 commit comments