solidjs / solid

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

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

Open trusktr opened 2 months ago

trusktr commented 2 months 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 1 month 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 1 month 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.