choojs / hyperx

🏷 - tagged template string virtual dom builder
BSD 2-Clause "Simplified" License
1.01k stars 48 forks source link

Breaks When Using <br/> #38

Closed FlorianWendelborn closed 6 years ago

FlorianWendelborn commented 7 years ago

I tried to modify hyperapp's counter example. When inserting a line-break <br/> it broke. 🙁

Console

InvalidCharacterError (DOM Exception 5): The string contains invalid characters.

Minimal Repro

app({
    view: () => html`<div>a<br/>b</div>`
})

Meta

Corresponding issue on hyperapp's repo.
Related to substack/hyperx#34.


Note that I do realize that <br> works. <br/> is more explicit though and as a React-user I'd like to keep this pattern.

Ramblurr commented 6 years ago

I also was caught by this bug.

josephg commented 6 years ago

Some notes:

yoshuawuyts commented 6 years ago

A PR to support <br/> would be very welcome!