Closed goto-engineering closed 4 years ago
Yeah I’ve had this problem since I started this project. I tried to fix it a few times but wound up just wrapping text in spans haha
I should really look at how hiccup solves it.
Throwing a warning is better than ignoring for now though
I came up with something that isn't the best, but it does handle this case:
https://github.com/joy-framework/joy/commit/f117a28fb909f737f7906a303d36687777ea5594
When I put too many arguments to a HTML structure, they get eaten without any error:
Only
<h1>You found joy!</h1>
is being rendered, the rest just gets dropped. Looks like inhtml.janet
increate-children
only the first child is used if it's a string or number. The rest just gets dropped.Should probably show some kind of warning, or even error? I found out accidentally when I put some text in the wrong place and it wouldn't show up.
This code change doesn't really address the issue well, just kind of a proof of concept of how it could be done. Open to suggestions or if there's a better way to handle it. This feels.. not systematic.