ryansolid / dom-expressions

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

fix-escaping-booleans #187

Closed orenelbaum closed 1 year ago

orenelbaum commented 1 year ago

Fixes https://github.com/solidjs/solid/issues/1443 Please review this PR since I'm not 100% confident about it.

ryansolid commented 1 year ago

Yeah we don't want to change the behavior of escaping. The problem is in the JSX transform I think. We should include the boolean logic in the escaping not outside.

Right now we get like:

_$ssr(_tmpl$, _$ssrHydrationKey(), !!_$escape(count()))

Instead of:

_$ssr(_tmpl$, _$ssrHydrationKey(), _$escape(!!count()))
ryansolid commented 1 year ago

I've submitted the fix to compilation. So this is not needed. Thanks though.