Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

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()) {}
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant