-
Notifications
You must be signed in to change notification settings - Fork 81
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
Treat Elvis operator as part of a call chain #213
Comments
With current version(after #416)
Would that be an acceptable output for this case, @sgrimm? |
Closing as I believe this is fixed. Feel free to reopen in case you think we still need to look into this |
Oops, sorry, I missed the earlier comment here. The new behavior is definitely an improvement over the old one, but I think it would still be better to treat the operator as a step in the call chain. I'll file a new issue to clarify. |
Currently, it looks like an Elvis expression isn't counted as part of a call chain for purposes of figuring out where to put line breaks in the chain.
Example:
If I replace the Elvis operator with a chained method call, the format changes:
and at that point, the Elvis operator gets formatted as part of the chain if I put it back:
I think it would be more consistent if the first example were formatted like:
Worth noting that this request possibly conflicts with #197.
The text was updated successfully, but these errors were encountered: