Skip to content

Remove spaces and/or line-breaks from empty curly braces #1232

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
IndrajeetPatil opened this issue Oct 2, 2024 · 0 comments · Fixed by #1234
Closed

Remove spaces and/or line-breaks from empty curly braces #1232

IndrajeetPatil opened this issue Oct 2, 2024 · 0 comments · Fixed by #1234

Comments

@IndrajeetPatil
Copy link
Collaborator

According to cf. https://style.tidyverse.org/syntax.html?q=empty%20curly%20braces#indenting, following

library(styler)

style_text(
  "while (waiting_for_something()) {  }"
)
#> while (waiting_for_something()) {  }


style_text(
  "while (waiting_for_something()) {

}"
)
#> while (waiting_for_something()) {
#> 
#> }

Created on 2024-10-02 with reprex v2.1.1|

should instead be styled to:

while (waiting_for_something()) {}
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

Successfully merging a pull request may close this issue.

1 participant