-
Notifications
You must be signed in to change notification settings - Fork 18
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
make the closing "/" character optional for the void HTML elements #74
Conversation
@@ -0,0 +1,13 @@ | |||
##### Template: | |||
# template test | |||
Hello<br>World</br> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a
opening element in the template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the error message is not the best after this change :-/
Let me see if I can quickly fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this message: "An orphan end element </br> is not needed, <br> is a void HTML element"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest:
</whatevervoidelem> and/or <whatevervoidelem/> is not needed here. As a void HTML element just <whateverelem> is fine
in which we replace dynamically whateverelem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My 2 cents here:
<br/>
is not necessary as<br>
is perfectly fine, but</br>
is not just "not needed", it is wrong.
Only the second point should be raised (as an error.)
|
I would still enforce the void element as a warning. Just to make sure that people that does not know will learn something. My concern here is quite simple. Let's consider something that does not know void elements syntax (or even just void elements period):
What would be the first reaction ? I am pretty sure it might be this one
People probably doesn't know void elements, if if you suggest that the closing tag is not mandatory, they will self close if... Which is totally fine, as @olaf-k mentioned. This is perfectly valid (even in html5, or x-html5 I would say..). |
Fixes #70
Closes #74