Skip to content

Prettier adds extra closing bracket when a pre tag contains elements with angular template reference variables #5457

@mister-walter

Description

@mister-walter

Prettier 1.15.2
Playground link

--parser angular

Input:

<pre><code #foo></code></pre>

Output:

<pre><code #foo></code>></pre>

Expected behavior:
Prettier should not add an extra closing angle bracket after </code>

EDIT: changed example to use <code> instead of <p>. This is how I originally found the bug, not sure why I thought it would be better to replace <code> with <p>...

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:htmlIssues affecting HTML (and SVG but not JSX)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions