-
Notifications
You must be signed in to change notification settings - Fork 178
Closed
Description
According to the standard, some elements may omit closing tags.
Example:
import htm from 'https://unpkg.com/htm?module'
let html = htm.bind((a, b, c) => console.log(a, b, c))
html`<ul><li><li></ul>`As we see in the output, a single h('li', null, undefined) was called.
It seems that
htmdisregards the actual closing tag and just matches the</signature, so that any open tag can be closed with "generic" end tag as<someTag><//>, which is quite handy in many ways.
This brings more serious problem with br tag.
Example (from the spec):
html`<p>P. Sherman<br>
42 Wallaby Way<br>
Sydney</p>`that gives a single h('br', null, undefined) call.
Metadata
Metadata
Assignees
Labels
No labels