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

Multiplication of parentheses around expressions #71

Open
cyberbiont opened this issue Jul 10, 2020 · 2 comments
Open

Multiplication of parentheses around expressions #71

cyberbiont opened this issue Jul 10, 2020 · 2 comments

Comments

@cyberbiont
Copy link

when I use variable in require path, something like

@require folder + '/fileName'

parentheses are added every time on formatting, like this

@require (folder + '/fileName')

then

@require ((folder + '/fileName'))

etc.

I found a workaround is to as add empty string at the beginning

@require '' + folder + '/fileName'

But I'm reporting it just in case.

@cyberbiont
Copy link
Author

The problem seems to more be more serious, something is wrong with the way parenthesis are inserted around expressions.
For example, simple ternary expression:

b = a ? b * 2 : b * 3

gets formatted as

b = a ? (b * 2) : (b * 3)

then

b = a ? ((b * 2)) : ((b * 3))

and each subsequent formatting keeps adding parentheses.

Is there at least an option to turn off parentheses around expressions at all ?

@cyberbiont cyberbiont changed the title Parentheses added on variable + string concatenation Multiplication of parentheses around expressions Jul 11, 2020
@cyberbiont
Copy link
Author

I see that it is a duplicate of
#45
#41
#30

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

1 participant