-
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
Implicit Return Function on New Line not Preserved #806
Comments
// remains unchanged
angular.module('bugcheck.filters').filter('zeroToDash',
a
)
// has same problem as reported above
angular.module('bugcheck.filters').filter('zeroToDash',
(a)
) I'm going to say this is a bug, but the fix may be tricky. I'll see what i can do in the next milestone. What is the syntax your using at |
@bitwiseman https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions It's an es6 arrow function using implicit return that's returning an es6 arrow function using implicit return. Using babel, it would look like this in es5:
|
Okay, the issue is that we don't preserve new lines after comma and before |
I threw this together - it works in my scenario and doesn't break the other tests. |
Well, that's pretty cool. Thanks! |
Resolve #806: Preserve newline on arrow functions.
Original Code:
I have
"preserve_newlines": true,
in my config file, but I get this output:Is there a different config flag I should be using to preserve the line break there?
The text was updated successfully, but these errors were encountered: