Skip to content

Implied End Tag Handling - v0.7.0 (beta 1)  #66

Description

@panoply

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>

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or requestHTMLHTML LanguageLiquidLiquid Language

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions