Skip to content

bang operator and spacing #176

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

Closed
lorenzwalthert opened this issue Aug 31, 2017 · 1 comment
Closed

bang operator and spacing #176

lorenzwalthert opened this issue Aug 31, 2017 · 1 comment

Comments

@lorenzwalthert
Copy link
Collaborator

https://github.com/krlmlr/styler/blob/ef10c291034c05957c7a9f9d870db604f99f712a/R/rules-spacing.R#L189

I was wondering whether this rule is really doing what you expect because it turns

a <- ! !!x

Into

a <- !!! x

Which is not the same anymore.

@krlmlr probably we should only remove spaces if the token after is not !? Because we still want

a <- ! FALSE

to become

a <- !FALSE
@krlmlr
Copy link
Member

krlmlr commented Aug 31, 2017

Agree that we need to check if the token after is also a bang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants