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

State: fix column positions for multiline strings #2009

Merged
merged 8 commits into from Jun 9, 2020

Conversation

kitbellew
Copy link
Collaborator

@kitbellew kitbellew commented Jun 8, 2020

Currently, multiline strings are handled inconsistently; computation of state columns also assumes that every line is aligned on the opening quotes, whether or not there is a margin symbol (|) and whether various margin-handling flags are set.

Instead, try to estimate the length of each line post-formatting and use that in computing the columns.

Fixes #1640.

scala-repos diffs:

@kitbellew kitbellew requested a review from poslegm June 8, 2020 18:36
@kitbellew kitbellew merged commit b84b862 into scalameta:master Jun 9, 2020
@kitbellew kitbellew deleted the 1640 branch June 9, 2020 13:16
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.

Non-idempotent formatting with multiline string in annotation
2 participants