-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Based on denoland/deno#30677 (and also mentioned in denoland/deno#30103)
dprint-plugin-typescript version: 0.95.12
The current behaviour means that single-line, whitespace-sensitive html (like the below spans) are formatted with surrounding whitespace where there shouldn't be any.
I separately tested the behaviour in markup_fmt directly, which (correctly) treats <span> elements as whitespace-sensitive and doesn't add surrounding whitespace, and so confirmed the whitespace was being added by this plugin.
Input Code
let htmlStringOne = html`<span>foo</span>`;
let htmlStringTwo = html` <span>foo</span>`;
let htmlStringThree = html`
<span>foo</span>`;Expected Output
let htmlStringOne = html`<span>foo</span>`;
let htmlStringTwo = html`<span>foo</span>`;
let htmlStringThree = html`
<span>foo</span>
`;Actual Output
let htmlStringOne = html`
<span>foo</span>
`;
let htmlStringTwo = html`
<span>foo</span>
`;
let htmlStringThree = html`
<span>foo</span>
`;Metadata
Metadata
Assignees
Labels
No labels