-
Notifications
You must be signed in to change notification settings - Fork 656
Reformat issue on call arguments #2815
Comments
Prettier's formatting as reference: deepCopyAndAsyncMapLeavesC(
{ source: sourceValue, destination: destination[sourceKey] },
1337,
{ valueMapper, overwriteExistingKeys }
); So it might be that we're just picking the "incorrect" layout. |
Myself and @yassere triaged the issue time ago, and we found out that the issue is due to the fact that our tools/crates/rome_formatter/src/macros.rs Lines 244 to 245 in 9e22611
|
This issue is stale because it has been open 14 days with no activity. |
This seems to be still valid issue |
I think the issue here is another one. I haven't looked very deeply but the call arguments formatter emits two different IRs for the first and second formatting. First:
Second
One difference that could be of importance is that object in the first version uses soft line breaks where the second version uses hard line breaks (always forcing the group to break, even if it otherwise would fit):
vs
Notice the By the way, Prettier has the same issue. To sum up. This isn't an issue with the printer but an issue with our formatting rules. |
A regression has been found when using the
best_fitting!
macro.The following code hits a reformat issue:
The text was updated successfully, but these errors were encountered: