Skip to content

Fix overaddition of leading whitespace to if expression#319

Merged
JohnnyMorganz merged 4 commits into
masterfrom
if_expr_leading_trivia
Dec 18, 2021
Merged

Fix overaddition of leading whitespace to if expression#319
JohnnyMorganz merged 4 commits into
masterfrom
if_expr_leading_trivia

Conversation

@JohnnyMorganz
Copy link
Copy Markdown
Owner

This is a temporary fix, since we are not yet formatting if-expressions fully, we are just leaving them as-is.
Without this, we over add leading whitespace (related: #297 #301)
Fixes #315

We do this temporarily since we are just leaving the if expression as is.
Other formatters will add leading trivia to this, causing too much trivia to be present
@JohnnyMorganz JohnnyMorganz merged commit 8679184 into master Dec 18, 2021
@JohnnyMorganz JohnnyMorganz deleted the if_expr_leading_trivia branch December 18, 2021 12:39
JohnnyMorganz added a commit that referenced this pull request Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repeated addition of whitespace when 'if then' ternary is used on multiline function call

1 participant