Skip to content
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

Preserve small objects inline (Old issue resurfaced) #995

Closed
ghost opened this issue Aug 11, 2016 · 8 comments
Closed

Preserve small objects inline (Old issue resurfaced) #995

ghost opened this issue Aug 11, 2016 · 8 comments

Comments

@ghost
Copy link

ghost commented Aug 11, 2016

This:

var x = { x: 2, y: 4 }

should not turn into this:

var x = {
    x: 2,
    y: 4
}

This issue was marked fixed with the solution being to set brace_style to "collapse-preserve-inline". This hasn't worked, and objects are still being spread across multiple lines.

@bitwiseman
Copy link
Member

How are you running js-beautifier? Command-line or as a part of another tool? If part of another tool, please make sure that tool as the latest version.

@ghost
Copy link
Author

ghost commented Aug 12, 2016

I'm working in Brackets. I'm assuming the code is the same since the version number is the same. I installed it fresh. Is there a different fix for brackets?

@bitwiseman
Copy link
Member

So, you're using this: https://github.com/brackets-beautify/brackets-beautify ?

@ghost
Copy link
Author

ghost commented Aug 12, 2016

Ah! I didn't know it was a separate project! I assumed it was the same one

@ttsirkia
Copy link

ttsirkia commented Aug 12, 2016

This definitely works without any issues in Atom which internally uses js-beautify. It must be related to Brackets.

@ghost
Copy link
Author

ghost commented Aug 12, 2016

You are correct. I just read on the other project that the latest version of brackets-beautify hasn't been uploaded to the servers because of an error. I assumed that since I wasn't getting an update option that it was the most recent. I'm now up to date and it works as expected!

@bitwiseman
Copy link
Member

☀️ Great! ☀️

@ttsirkia
Copy link

@Ceyaje any reason not to close the ticket if the issue is resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants