-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Allow single chained methods to be placed on same line #293
Comments
You can turn off "break lines on chained methods", and then turn on "preserve newlines". This won't enforce the structure, but it will preserve what you have: // input - expected to be unchanged after beautify
this._foo = new Date().getTime().milliseconds();
// other input - also expected to be unchanged
this._foo = new Date().getTime()
.milliseconds(); Combine this with line wraps and you should get reasonable chains. If what I'm describing doesn't sound sufficient, could you give some more extensive examples? Include input, current output, and what you'd like to see. |
I believe I'm experiencing something similar. I have the following code:
When I run beautify I get the following:
I want my first example to be unaffected by beautifying. Any tips or hints? |
@gilazo - set |
I have the same issue and turning off "break lines on chained methods" is not possible for in my case.
output:
desired output:
|
Related to #809 ? |
@joaobarcia - Sure. #809 would be the more flexible setting. |
I'd like an option to allow single chained methods to be placed on same line, as in if there is only two calls, then those two are placed on the same line. Here are some examples of code that doesn't really look good with the current "break lines on chained methods" option:
Would this be feasible or is this just too much work for little gain?
The text was updated successfully, but these errors were encountered: