esthetic
esthetic copied to clipboard
Implied End Tag Handling - v0.7.0 (beta 1)
Description
Currently, Æsthetic does not care about invalid implied end tag placements. Specifically, <p> wherein decedent occurrences will format without error, but this is otherwise invalid markup.
Approach
During the lexing process, the stack will be checked for occurances of flow types with implied end tags by matching against a set of HTML Phrasing tags, predefined in the HTML Grammer model. If a match it determined, Parse Error will be thrown.
Extended Capabilities
Given that HTML tag categories will be exposed to the HTML Grammars, Æsthetic will be able to better handle Phrasing tags.
Example
The following code sample will incur a parse error.
<!-- Valid Example -->
<p>
THIS CODE WILL SUCCEED
</p>
<!-- Invalid Example -->
<p>
<div>
THIS CODE WILL THROW PARSE ERROR
</div>
</p>