solidjs / solid

A declarative, efficient, and flexible JavaScript library for building user interfaces.
https://solidjs.com
MIT License
32.25k stars 919 forks source link

[html] `html` template can fail to include text nodes in the output #2299

Open trusktr opened 3 weeks ago

trusktr commented 3 weeks ago

Describe the bug

Sometimes html can fail to include text nodes in the output.

Your Example Website or App

https://playground.solidjs.com/anonymous/d10b1bee-80b9-4e43-9a24-9907ea2f7fd0

Steps to Reproduce the Bug or Issue

The output is missing the foo:.

Expected behavior

Expect to see foo: included in the output.

Screenshots or Videos

No response

Platform

n/a

Additional context

No response

JeredArc commented 3 days ago

I've experienced the same issue! I've come to the conclusion, that it ignores leading text. Any text that comes after (or inside) a tag is rendered, only text at the beginning is missing.

I consider this a bug!

ryansolid commented 2 days ago

@JeredArc .. thanks that makes a lot of sense. The other methods have no top-level that can take text (h, jsx) so this was an oversight.