-
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
Block formatting within function call parameters. #258
Labels
Comments
Neat. This might be addressed by #259, but might not. I'll modify the test framework so we can this class of issues in the future. |
bitwiseman
added a commit
to bitwiseman/js-beautify
that referenced
this issue
May 9, 2013
beautifier#258 surfaced and interersting issue that was not caught by the current test framework. Now the framework checks that beautified output is unchanged after being run through the beautifier again. Adding this check immediately found a bug in the beautification of function declarations. Fixed that as well.
Oh, fun with comments again. I have a fix for this case, but it fails this one: function test(arg1, arg2, arg3) {
console.log(arguments);
}
test(
/*Argument 1
*/
{
"Value1": "1"
},
/*Argument 2
*/
{
"Value2": "2"
},
/*Argument 3
*/
{
"Value3"
}); |
Thanks a lot. I will wait till its gets published at npm. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In case if block formatting is used for function call arguments, like shown in following example.
After beautify this code is formatted like
On next beautify this is again formatted like
And keeps happening.
Expected: Keep first formatting one with block comment on new line.
Same thing happens one http://jsbeautifier.org/
The text was updated successfully, but these errors were encountered: