End tag causes two parse errors #117
Closed
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
The
</svg>is parsed in foreign context becauseannotation-xmlelement) is not in theHTML namespace;
(separate condition from 3);
annotation-xmlelement butthe token (
</svg>) is not a start tag;annotation-xmlisn't an HTMLintegration point because it lacks a particular attribute);
annotation-xmlisn't anHTML integration point).
Thus the "any other end tag" clause of 12.2.6.5 "The rules for parsing
tokens in foreign context" applies.
The current node's tag name (
annotation-xml) is not the same as thetag name of the token (
svg) so this is a parse error.Since there's no
svgelement in the stack of open elements, the loopin step 3 through 6 of the "any other end tag" clause exits when the
bodyelement is reached. and the token is processed according to thecurrent insertion mode, "in body."
The
</svg>matches the "any other end tag" of "in body." Since theMathML
annotation-xmlelement is not an HTML element but is specialwhich is a second parse error.