Skip to content

Conversation

pmdartus
Copy link
Member

@pmdartus pmdartus commented Sep 10, 2017

\cc @HTMLParseErrorWG/core

@pmdartus
Copy link
Member Author

Couple of questions:

  • I added a generic error unexpected-doctype that can be reused in multiple other places: "before head" insertion mode, "in head" insertion mode, "in head noscript" insertion mode, ... Should I update all the error location in this PR, or do you think it's better to update them once we reach those section?

  • I am not a fan of a generic parse-error-unexpected-end-tag error message to handle the end tag case. This message is too way vague. But on the other hand creating a specific error per insertion mode to handle the "Any other end tag" doesn't provide much value either. Thoughts ?

@inikulin
Copy link
Member

inikulin commented Sep 11, 2017

@pmdartus Great work!

Should I update all the error location in this PR, or do you think it's better to update them once we reach those section?

Yes, we'll update them when we'll work on these sections.

unexpected-doctype

I've been thinking about calling it misplaced-doctype, since this error occurs when DOCTYPE is not a document preamble. "unexpected" is way too generic here imho.

I am not a fan of a generic parse-error-unexpected-end-tag error message to handle the end tag case. This message is too way vague. But on the other hand creating a specific error per insertion mode to handle the "Any other end tag" doesn't provide much value either.

I've been thinking about calling it end-tag-without-matching-start-tag and outlining in the description that it occurs for all tags with an exception for "head", "body", "html" (start tags for those are optional and explicitly closing them with an end tag is perfectly valid) and "br" (my guess is that it was done for the historical reasons due to significant amount of markup in the wild that uses </br> instead of <br/>, but it's worth searching https://lists.w3.org/Archives/Public/ or ask WHATWG veterans via GitHub or IRC for the confirmation).


<tr>
<td><dfn data-x="parse-error-unexpected-doctype">unexpected-doctype</dfn>
<td>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to elaborate what we mean by "incorrectly placed": if DOCTYPE is not a document preamble, i.e. there is content that is not comments or ASCII whitespace before it.


<tr>
<td><dfn data-x="parse-error-unexpected-end-tag">unexpected-end-tag</dfn>
<td>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@inikulin
Copy link
Member

@pmdartus Any update on this? I'm just asking because I'm blocked on this errors at the moment: they will be used in the consequent insertion modes as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants