ryansolid / dom-expressions

A Fine-Grained Runtime for Performant DOM Rendering
MIT License
858 stars 125 forks source link

wrong markup structure after omitting closing tags #232

Closed bsl-zcs closed 1 year ago

bsl-zcs commented 1 year ago

here's example. innermost div gets closed instead of section.

it reproduces with babel-plugin-jsx-dom-expressions@0.36.6

in the real project it doesn't throw errors but totally mess the markup by placing components into wrong parents.

i've traced the problem down to this condition but failed to make a test case in packages/babel-plugin-jsx-dom-expressions/test/__dom_fixtures__ - it complains about section inside div, and so forth.

this comment contains a phrase "no siblings after at any parent level" - i think it should fix such problems if implemented.

ryansolid commented 1 year ago

I just missed passing the close set through non-closing children. This should be fixed in babel-plugin-jsx-dom-expressions 0.36.8.