-
Notifications
You must be signed in to change notification settings - Fork 258
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
Update prettifier library to 1.8.x #646
Comments
Please file this issue at https://github.com/beautify-web/js-beautify |
Thanks. I see it was already reported here - fixed 4 days ago. |
victorporof
changed the title
Incorrect indentation in a specific case (JS)
Update prettifier library to 1.8.x
Oct 17, 2018
@PStanislav @victorporof |
Fixed db59fb5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Everything worked fine before (for the same project, same code), but since one of the recent updates some incorrect indentation happens in certain JavaScript files when this package is run to prettify.
I did some testing, and it appears to me that the problem occurs when async/await syntax is used for object methods, and it affects every such method of the object (except the last one), resulting in duplicated indent at the beginning of each method (e.g. 4 spaces instead of 2). Every such misalignment propagates through the rest of the object properties, creating cumulative effect. Only exception from the pattern, as already mentioned, is when such method is the last property of the object - indentation is correct then.
Example for code w/o async/await syntax (all ok):
Example for similar code w/ async/await syntax (issue):
The text was updated successfully, but these errors were encountered: