-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional tags problem #91
Comments
As of 2.0, htm is an XML dialect in order to match JSX, not an HTML dialect. Optional tags are not supported, instead use XML self-closing tags: html`<p>P. Sherman<br />
42 Wallaby Way<br />
Sydney</p>` |
Just stumbled upon this implementing custom tags. Just leaving that here. |
In addition, some other use-cases of unclosed tags left out:
Not necessary useful, but little parser improvement (eg. a customizable dict of unclosed tags) could make |
Sorry for bothering with notifications, just one more potentially realistic improvement over JSX. |
In case if someone needs better support for html - there's xhtm - extensible htm version. |
According to the standard, some elements may omit closing tags.
Example:
As we see in the output, a single
h('li', null, undefined)
was called.This brings more serious problem with
br
tag.Example (from the spec):
that gives a single
h('br', null, undefined)
call.The text was updated successfully, but these errors were encountered: