Skip to content

[SourceKit/CodeFormat] Don't modify multiline string indentation regardless of it being column-aligned or not. #30894

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

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

nathawes
Copy link
Contributor

@nathawes nathawes commented Apr 8, 2020

Resolves rdar://problem/61463947

…rdless of it being column-aligned or not.

Resolves rdar://problem/61463947
@nathawes nathawes requested a review from benlangmuir April 8, 2020 19:17
@nathawes
Copy link
Contributor Author

nathawes commented Apr 8, 2020

@swift-ci please test

@nathawes
Copy link
Contributor Author

nathawes commented Apr 9, 2020

@swift-ci please test Windows Platform

@benlangmuir
Copy link
Contributor

LGTM for the specific change. One question: are we not indenting in multi-line strings at all? What happens on a blank line after opening a multi-line string?

@nathawes
Copy link
Contributor Author

nathawes commented Apr 9, 2020

LGTM for the specific change. One question: are we not indenting in multi-line strings at all?
What happens on a blank line after opening a multi-line string?

We're not. Indentation is left as is, so hitting enter after the opening quotes puts you at column 1 on the next line (same behavior as 5.2). This change is just so we don't mess up leading indentation where we didn't before. There are a bunch of open indentation issues we still need to look at for multi-line strings and also block comments (which have a bunch of the same issues).

Copy link
Contributor

@benlangmuir benlangmuir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for the explanation

@nathawes nathawes merged commit 8e527ed into swiftlang:master Apr 9, 2020
@nathawes nathawes deleted the avoid-multiline-string-indent branch April 9, 2020 19:48
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.

2 participants