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

bracestyle expand causing odd formatting with JSON objects #47

Closed
storey247 opened this issue Feb 10, 2015 · 1 comment
Closed

bracestyle expand causing odd formatting with JSON objects #47

storey247 opened this issue Feb 10, 2015 · 1 comment

Comments

@storey247
Copy link

I have found a couple of scenarios where using the bracestyle expand when formatting .js code causes a few odd results.

Consider the following:

var x = y || {};

this seems to result in the following code (which looks a little clumsy):

var x = y || 
{};

It would be nice if the bracing was left untouched after the logical OR operand in these scenarios

@vkadam
Copy link
Owner

vkadam commented Mar 8, 2015

I am not able to reproduce it, I have added a test case to prove it. Take a look at commit 70e5694.

Also this plugin does not do formatting its own, it just proxy to js-beautify. If you can still reproduce at your side, send me content of files and version's of plugin you are using. I will be happy to reproduce and help to find out the cause for it

@vkadam vkadam closed this as completed Mar 8, 2015
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