choojs / hyperx

🏷 - tagged template string virtual dom builder
BSD 2-Clause "Simplified" License
1.01k stars 48 forks source link

Treat single top-level array template part as a fragment #74

Closed goto-bus-stop closed 5 years ago

goto-bus-stop commented 5 years ago

Previously, this already generated a fragment, with 3 nodes:

hx`
  <a></a>
  ${[1, 2]}
`

It would make sense for this to also generate a fragment, with 2 nodes:

hx`
  ${[1, 2]}
`