dont self-close elements - fixes #200

pull/201/head
Rich Harris 8 years ago
parent e016b200ef
commit 92ec869b6c

@ -198,8 +198,6 @@ export default function compile ( parsed, source, { filename }) {
if ( voidElementNames.test( node.name ) ) {
element += '>';
} else if ( node.children.length === 0 ) {
element += '/>';
} else {
elementDepth += 1;
element += '>' + node.children.map( stringify ).join( '' ) + `</${node.name}>`;

@ -1 +1 @@
<textarea readonly/>
<textarea readonly></textarea>

@ -1 +1 @@
<div class="foo"/>
<div class="foo"></div>
Loading…
Cancel
Save