-
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
Format json in line #114
Comments
That's a good idea, but, sadly, this wouldn't work good at all. The The proper solution, I guess, would be seeing physically how many items Einar. |
At least we can provide such a configuration, and by default it's disabled, so it won't change the behavior of current. But if I enable it, it will work as I described above. I think it's very useful when I use jsbeautifier as my javascript formatter when coding -- which I have fully control of my code. |
I agree there are scenarios where this would be nice, but to handle them right (even in a configuration only case) would require significant work - see #200 for related discussion. If you can find a way to do it and add the tests, submit a pull request and we can discuss. |
At present, jsbeautify will format json into multi-lines. For example:
will be formatted as:
But I think it's kept inline will be better for this code.
Will jsbeautify handle it like this:
if
{
is at the line end, it will be formatted into multi-lines:if not, format them inline
So, we can control if the json be formatted inline or multiline
The text was updated successfully, but these errors were encountered: