pull/15538/head
Rich Harris 4 months ago
parent 448cff1141
commit 747d24a8ad

@ -49,7 +49,7 @@ function build(item) {
const children = item.children.map(build); const children = item.children.map(build);
element.properties.push(b.prop('init', b.id('c'), b.array(children))); element.properties.push(b.prop('init', b.id('c'), b.array(children)));
// special case — strip leading newline from `<pre>` and `<textarea>` // special case — strip leading newline from `<pre>` and `<textarea>`
if (item.name === 'pre' || item.name === 'textarea') { if (item.name === 'pre' || item.name === 'textarea') {
const first = children[0]; const first = children[0];
if (first?.type === 'Literal') { if (first?.type === 'Literal') {

Loading…
Cancel
Save