Skip to content

[Static optimization] SVG <path> siblings treated as parent-children #2897

Closed
@nolanlawson

Description

@nolanlawson

Description

The static node optimization (#2781) seems to have introduced a regression for SVGs. Minimal repro:

<!-- component.html -->
<template>
    <svg>
        <g>
            <path></path>
            <path></path>
        </g>
    </svg>
</template>

This compiles to:

const $fragment1 = parseFragment`<svg${3}><g${3}><path${3}><path${3}></g></svg>`;

Which renders to HTML as:

<svg>
  <g>
    <path>
      <path></path>
    </path>
  </g>
</svg>

Note that the <path>s were treated as siblings in the source, but they're rendering as parent-child in the output.

W-11320628

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