Skip to content

Ember handlebars formatting doesn't allow for self-closing tags #13624

@ArnaudWeyts

Description

@ArnaudWeyts

Prettier 2.7.1
Playground link

Input:

<div />
<custom-component />

Output:

<div></div>
<custom-component></custom-component>

Expected behavior:

<div />
<custom-component />

Ember allows for self-closing tags (see docs), but prettier with the glimmer parser adds closing tags instead. I'm not sure if this was a conscious decision, because the JSX parser does convert closing tags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:handlebarsIssues affecting Handlebars (Glimmer)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions