Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix indentation of multiline strings when part of a larger expression. #532

Merged
merged 1 commit into from
May 26, 2023

Conversation

allevato
Copy link
Member

The stacked indentation behavior wasn't robust enough to catch other kinds of subexpressions that a multiline string could be in and our tests weren't thorough enough to catch this. The most common occurrence was when a multiline string was followed by a dotted member access, which caused the string to become unindented one level from where it should have been.

@allevato
Copy link
Member Author

cc @dylansturg

The stacked indentation behavior wasn't robust enough to catch other
kinds of subexpressions that a multiline string could be in and our
tests weren't thorough enough to catch this. The most common
occurrence was when a multiline string was followed by a dotted
member access, which caused the string to become unindented one
level from where it should have been.
@allevato allevato merged commit 146c573 into swiftlang:main May 26, 2023
@allevato allevato deleted the multiline-string-fixes branch May 26, 2023 16:31
allevato added a commit to allevato/swift-format that referenced this pull request Jun 29, 2023
Fix indentation of multiline strings when part of a larger expression.
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.

None yet

2 participants