jaml icon indicating copy to clipboard operation
jaml copied to clipboard

Produces invalid HTML when div has no content

Open stugol opened this issue 9 years ago • 0 comments

The code

div({ cls: 'rect1' });

produces

<div class="rect1"/>

which is not valid HTML!

What possessed you to keep a list of non-self-closing tags and have all others self-close, rather than specifying a (very small) list of tags that can self-close?

notSelfClosingTags: ['textarea', 'script', 'em', 'strong', 'option', 'select']
/* and by implication, everything else is self-closing!!!! */

This is clearly very silly.

stugol avatar Sep 13 '16 19:09 stugol