Skip to content

Sibling self closing tags become nested #1434

Description

@m3m0m2

Expected Behavior

A sequence of multiple self closing tags can be parsed.
Example:

<circle id="pointA" cx="100" cy="350" r="3" />
<circle id="pointB" cx="200" cy="200" r="3" />

Actual Behavior

<tag1 />
<tag2 />

seem to be parsed as:

<tag1>
  <tag2>
  </tag2>
</tag1>

so tag2 becomes a child of tag1.

Steps to Reproduce

For example try:

parse('<circle id="pointA" cx="100" cy="350" r="3" /><circle id="pointB" cx="200" cy="200" r="3" />')

I wonder if maybe this could be a domparser issue, not specific of this repo.

Example in StackBlitz

https://stackblitz.com/edit/react-he4dd8?file=src%2FApp.js

Activity

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

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions