Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nolanlawson opened this issue Jun 21, 2022 · 0 comments · Fixed by #2898
Closed

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

nolanlawson opened this issue Jun 21, 2022 · 0 comments · Fixed by #2898
Labels

Comments

@nolanlawson
Copy link
Collaborator

nolanlawson commented Jun 21, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant