-
-
Notifications
You must be signed in to change notification settings - Fork 24
[Oxpecker.ViewEngine][Enhancement] Render Empty Element Tags according to XML spec #48
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
Conversation
This reverts commit 1a1df72.
- Add alias for checking empty state of CustomQueue - Refactor out attribute renderer from html start tag renderer - add html empty elem tag renderer - adjust tests to fit expected behaviour - green tests
This reverts commit 1a1df72.
- Add alias for checking empty state of CustomQueue - Refactor out attribute renderer from html start tag renderer - add html empty elem tag renderer - adjust tests to fit expected behaviour - green tests
|
Fantomas fails on test file formatting; this PR doesn't change the test files other than adjusting the expected output to match the spec |
|
Thanks for the PR, you probably wanted to adjust Oxpecker.Solid rendering, but edited server rendering instead. Oxpercker.ViewEngine is following HTML spec, not XML or JSX spec, so self-closing tags are prohibited. Oxpecker.Solid rendering is done using the Oxpecker.Solid.FablePrlugin |
|
|
I think this link is more relevant https://stackoverflow.com/questions/3558119/are-non-void-self-closing-tags-valid-in-html5
Anyway, changing regular HTML to non-regular is not something a general ViewEngine implementation should do (in my opinion). |
|
Oof that is a hectic one. I do concede to that! The rabbit hole goes deeper than it should hahaha |
|
Nothing the Plugin can do to fix this. I've made a pull to Fable which addresses the issue. For now I'm just going to have to go between stable Fable and my own forked version of Fable until the pull is addressed. |
This pull adds:
This matches the xml spec and removes some unexpected behaviours when unsafely injecting property spreads due to the children prop being nullified by the empty start/end tags.