You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BasicFormat should not add a mandatory leading space if one already exists on the previous trailing or there is no previous. Similarly it should not add a trailing space if one already exists on the next leading or there is no next.
A good example of this is when combining refactorings. Placeholder expansion may want to format the returned closure. But if that closure is then used by a trailing closure conversion, we'll end up with two spaces between the arg label and the closure.
Steps to Reproduce
Format a simple closure ({ <#code#> }). That produces -
{
<#code#>
}
Then if that is added in a call as an additional trailing closure and that call is formatted we end up with two spaces, since we also add a space after : -
call {
<#code#>
}arg2: {
<#code#>
}
The text was updated successfully, but these errors were encountered:
Description
BasicFormat should not add a mandatory leading space if one already exists on the previous trailing or there is no previous. Similarly it should not add a trailing space if one already exists on the next leading or there is no next.
A good example of this is when combining refactorings. Placeholder expansion may want to format the returned closure. But if that closure is then used by a trailing closure conversion, we'll end up with two spaces between the arg label and the closure.
Steps to Reproduce
Format a simple closure (
{ <#code#> }
). That produces -Then if that is added in a call as an additional trailing closure and that call is formatted we end up with two spaces, since we also add a space after
:
-The text was updated successfully, but these errors were encountered: