Describe the bug
dprint-plugin-typescript version: 0.95.15
Input Code
function render_string_template() {
return `
<div>
${tooltip ?
`<my-tooltip>content content content content</my-tooltip>`: nothing}
<div>
${tooltip ?
`<my-tooltip>content content content content</my-tooltip>`: nothing}
</div>
</div>
`;
}
function render_html_template() {
return html`
<div>
${tooltip ?
html`<my-tooltip>content content content content</my-tooltip>`: nothing}
<div>
${tooltip ?
html`<my-tooltip>content content content content</my-tooltip>`: nothing}
</div>
</div>
`;
}
Expected Output
prettier playground link
function render_string_template() {
return `
<div>
${
tooltip
? `<my-tooltip>content content content content</my-tooltip>`
: nothing
}
<div>
${
tooltip
? `<my-tooltip>content content content content</my-tooltip>`
: nothing
}
</div>
</div>
`;
}
function render_html_template() {
return html`
<div>
${tooltip
? html`<my-tooltip>content content content content</my-tooltip>`
: nothing}
<div>
${tooltip
? html`<my-tooltip>content content content content</my-tooltip>`
: nothing}
</div>
</div>
`;
}
(Note that Prettier produces different outputs depending on the existence of html, but that's a separate topic (#9) and not the primary focus of this issue.)
Actual Output
dpint playground link
function render_string_template() {
return `
<div>
${
tooltip
? `<my-tooltip>content content content content</my-tooltip>`
: nothing
} ⚠️
<div>
${
tooltip
? `<my-tooltip>content content content content</my-tooltip>`
: nothing
} ⚠️
</div>
</div>
`;
}
function render_html_template() {
return html`
<div>
${
tooltip
? html`<my-tooltip>content content content content</my-tooltip>`
: nothing
} ⚠️
<div>
${
tooltip
? html`<my-tooltip>content content content content</my-tooltip>`
: nothing
} ⚠️
</div>
</div>
`;
}
The ending } character is broken onto its own line and indented less than the surrounding <div> element, make it visually appears to be outside of the <div> hierarchy.
Describe the bug
dprint-plugin-typescript version: 0.95.15
Input Code
Expected Output
prettier playground link
(Note that Prettier produces different outputs depending on the existence of
html, but that's a separate topic (#9) and not the primary focus of this issue.)Actual Output
dpint playground link
The ending
}character is broken onto its own line and indented less than the surrounding<div>element, make it visually appears to be outside of the<div>hierarchy.