-
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
Array of objects in JSON #1402
Comments
If you set {
"stuff": [
{
"thing": "other thing"
},
{
"thing": "other thing"
}]
} But actually, this is a bug, because |
Even if the bug gets fixed,
Becomes
Rather than
|
@rinu Yes, you're correct. What you're describing is an enhancement. |
@bitwiseman any updates on this issue? |
@Huachao |
Does anyone expect this issue to ever get fixed? It's the ONE issue I have with js-beautify, unfortunately. |
@stevekanter-arcticleaf |
Description
I need the beautified version not to start an array and object on the same line. This is for code folding with codemirror which only has one folding button per line. It defaults to folding the object but my intent was to fold the entire array. An annoying workaround is to enter a new line manually before folding.
The current version looks prettier so I would like it to be an option rather than the default.
Input
The code looked like this before beautification:
Expected Output
The code should have looked like this after beautification:
Actual Output
The code actually looked like this after beautification:
Steps to Reproduce
I used indent_size: 2 as the only option. Can be reproduced on http://jsbeautifier.org/
I'm using js-beautify 1.7.5 from npm.
The text was updated successfully, but these errors were encountered: