-
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
add support to less functions paramters braces #568
Conversation
} else if (ch === ',') { | ||
output.push(ch); | ||
eatWhitespace(); | ||
if (!insideRule && selectorSeparatorNewline) { | ||
if (!insideRule && selectorSeparatorNewline && roundBraceLevel < 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Round brace"... do you mean parenthesis?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's call them that then. 😄
You can say call it parenLevel
if you like. roundBraceLevel
is odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok done
Thanks for the PR. You have tests and updated python, too. Very cool. |
There is a test not supported yet. given: .tabs ( ) { } the code will output (1 space between function name and parenthesis) .tabs () {} instead of .tabs() {} |
Is it just me or does it look like the build failure was unrelated to the changed code? Did Travis just flake out? |
It's an error on node's npm, unrelated to js-beautify code |
@lejenome - I've merged your change. Thanks! It turned on the test you said was failing, just to encode the behavior. It might be incorrect but it isn't horrible or a syntax error. We can address it later. Please file an issue. |
this PR adds better support for less functions braces (no new lines between function parameters)
e.g: the new code outputs this
and the old code outputs this: