-
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
Javascript ++ Operator get wrong indent #1283
Comments
Duplicate of #203. |
@Gegoiuty Actually: this doesn't happen on http://jsbeautifier.org/ . Please try you code there. If it works (formats correctly), then your editor/plugin needs updating to use the latest js-beautifier. |
I try code in http://jsbeautifier.org/ , and it doesn't format correctly :( . And this is my code.
|
By the way, I use HTML-CSS-JS Prettify in Sublime Text 3 Build 3143, macOS 10.13. |
@Gegoiuty js
I don't know when I'll have time to look at this but at least we have a good repro vs non-repro example. Thanks! |
Hello, do you have any info on when and if you will adresse this issue ? |
@Elrendio I have almost no time to work on this project currently, but I will make time to review any pull request submissions. |
Hello, I'v done a commit to resolve this issue (handled python and node changes), all the tests pass (python and js). However I dont have the rights to push a new branch and create à PR. |
Thanks!
Create a fork, push to a branch there, and PR from there.
…On Fri, May 4, 2018, 6:41 AM Oscar Walter ***@***.***> wrote:
Hello, I'v done a commit to resolve this issue (handled python and node
changes), all the test pass (python and js). However I dont have the rights
to push a new branch and create à PR.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1283 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB3kKc4ccX0ZVPB0WNl0gwbujerxzBTeks5tvFqcgaJpZM4QKVNL>
.
|
Resolves beautifier#1283 **What was done:** - Adapted function print_newline to restore mode if last_test was operator ++ or -- - Added corresponding test. **Example of behavior:** == Input == |== Expexted Output == {this.foo++ |{ bar} | this.foo++ | bar |} |
Resolves beautifier#1283 **What was done:** - Adapted function print_newline to restore mode if last_test was operator ++ or -- - Added corresponding test. **Example of behavior:** == Input == {this.foo++ bar} == Expexted Output == { this.foo++ bar }
Resolves beautifier#1283 **What was done:** - Adapted function print_newline to restore mode if last_test was operator ++ or -- - Added corresponding test. **Example of behavior:** == Input == {this.foo++ bar} == Expexted Output == { this.foo++ bar } == Unchanged == axios.interceptors.request.use( config => { // loading window.store.loading++ let extraParams = {} } )
Resolves beautifier#1283 **What was done:** - Adapted function print_newline to restore mode if last_test was operator ++ or -- - Added corresponding test. **Example of behavior:** == Input == {this.foo++ bar} == Expexted Output == { this.foo++ bar } == Unchanged == axios.interceptors.request.use( config => { // loading window.store.loading++ let extraParams = {} } )
Description
Input
The code looked like this before beautification:
Actual Output
The code actually looked like this after beautification:
Environment
OS:
macOS 10.13
Settings
Example:
The text was updated successfully, but these errors were encountered: