Skip to content

<svg> tag makes the next siblings disappear #10172

@byF

Description

@byF

🐛 bug report

If you try to parcel an HTML file such as this:

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
  </head>
  <body>
    <div>
      <svg></svg>
      <p>aaa</p>
      <p>bbb</p>
    </div>
  </body>
</html>

the HTML file produced by Parcel will have two newlines instead of paragraphs, i.e.

<div>
  <svg></svg>


</div>

This happens only for the tags which follow after the svg tag.

🎛 Configuration (.babelrc, package.json, cli command)

Default settings, running parcel build test.html

🌍 Your Environment

Software Version(s)
Parcel 2.15.2
Node 22.15.0
npm/Yarn 11.3.0
Operating System macOS Sequoia 15.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions