You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today all code gennerated using this library are full tags like <div></div>. When a tag don't have any content it should insted be a closed empty tag, like for <br/>.
If I add this feature it's important to note that some tags should always be an opening and closing tag. Like f.eks. <script> </script> (never <script/>).
The text was updated successfully, but these errors were encountered:
The html5 standard has the following to say about "self closing tags":
Then, if the element is one of the void elements, or if the element is a foreign element, then there may be a single U+002F SOLIDUS character (/). This character has no effect on void elements, but on foreign elements it marks the start tag as self-closing.
That means I could check if the tag is in the set of void elements or foreign elements. But there might be very little to gain from this, in the case of void elements the "correct approach" is probably just to leave of the closing tag altogether. However we can't do that for isomorphic-jsx as I want it to be compatible with both HTML and XML.
What we perhaps could do is add an option to the library so that projects who use it can themself set the policy for "self closing tags". However for now I think we'll just leave the issue open until we find a usecase where it is needed.
Today all code gennerated using this library are full tags like
<div></div>
. When a tag don't have any content it should insted be a closed empty tag, like for<br/>
.If I add this feature it's important to note that some tags should always be an opening and closing tag. Like f.eks.
<script> </script>
(never<script/>
).The text was updated successfully, but these errors were encountered: