Skip to content

馃悰 BUG: don't infer HTML optional end tags#50

Description

@jp-knj

What version of @astrojs/compiler-rs are you using?

0.2.2

What package manager are you using?

pnpm

What operating system are you using?

Mac

Describe the Bug

Summary

parser does not handle HTML optional end tags such as <p>one<p>two.
It requires an explicit closing tag for not void elements such as p, ul, select, table

  • <p>one<p>two
  • <ul><li>one<li>two</ul>
  • <select><option>A<option>B</select>
  • <table><tr><td>A<td>B<tr><td>C</table>

Repro

<p>one
<p>two

Expected

It should infer the first </p> before the second <p> or produce AST to two sibling paragraphs.

<p>one</p>
<p>two</p>

Link to Minimal Reproducible Example

https://ast-explorer.dev/#eNpVUEtuxSAMvApi8zZFqLuqIpHac7Ch4DZIxETgJqqi3L0OL3mfFWOPZxjNKpN8l65SyfJFTidWPo9TTFBUqbz3vFdKWfQZKwmKlEB04vKx34pPV6OvF4vtxAw0JpEc/nRWAlrZWxTCDOBCQ4xHICf84EoF4qNf+lZvVgr9xKMbgck5wjLlQszz5wS4K5YYaOgCzNGDasOjvMXr1/ZsRl/HFkLfUpivHP5OQYjzAfegr3cp43PPzNRnhKeZlnxY6NPD6MOZ1VwEA+4vc3/rJrd/zHJyag==

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions