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

Split: represent a newline alternative differently #2011

Merged
merged 6 commits into from
Jun 10, 2020

Conversation

kitbellew
Copy link
Collaborator

Currently, newlines can be optionally replaced with a space or nosplit. However, the problem is that the replacement should not come with the same set of indents (or, rather, add a shorter negative indent).

Also, move handling of the replacement into State, from FormatWriter.

Fixes #1400.

The `split` parameter conflicts with the class field of the same name,
so rename to nextSplit.

Also, for consistency, rename all variables to use nextXxx; currently,
some as nextXxx and some are newYyy.
Currently, newlines can be optionally replaced with a space or nosplit.
However, the problem is that the replacement should not come with the
same set of indents (or, rather, add a shorter negative indent).

Also, move handling of the replacement into State, from FormatWriter.
@kitbellew kitbellew requested a review from poslegm June 9, 2020 14:28
@kitbellew kitbellew merged commit 93b2e29 into scalameta:master Jun 10, 2020
@kitbellew kitbellew deleted the 1400 branch June 10, 2020 10:32
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.

Weird indenting for Try/recover blocks
2 participants