-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
Labels
type:duplicateIssues that are a duplicate of a previous issueIssues that are a duplicate of a previous issue
Description
Prettier 3.7.3
Playground link
--parser typescriptInput:
// test file: jsx/significant-space/test.js
before_break1 =
<span>
<span barbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar /> foo
</span>
// test file: jsx/text-wrap/test.js
x =
<div>
ENDS IN <div>
text text text text text text text text text text text
</div>{" "}
HRS
</div>Output:
before_break1 = (
<span>
<span barbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar />{" "}
foo
</span>
);
x = (
<div>
ENDS IN <div>text text text text text text text text text text text</div>{" "}
HRS
</div>
);Expected output:
before_break1 = (
<span>
<span
barbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar
/>{" "}
foo
</span>
);
x = (
<div>
ENDS IN <div>
text text text text text text text text text text text
</div>{" "}
HRS
</div>
);Why?
Both cases' line widths are over 80, so they should be broken into the next line.
Note: I am working on fixing oxc-project/oxc#16199 and found that these two cases fail after that issue case has been resolved.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type:duplicateIssues that are a duplicate of a previous issueIssues that are a duplicate of a previous issue