Skip to content

Persistent Line breaks after if #348

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
t-kalinowski opened this issue May 27, 2025 · 1 comment · Fixed by #340
Closed

Persistent Line breaks after if #348

t-kalinowski opened this issue May 27, 2025 · 1 comment · Fixed by #340

Comments

@t-kalinowski
Copy link
Member

Currently,

A snippet like this:

if (some_condition) 
  x <- 1

Will get collapsed to one line:

if (some_condition) x <- 1

What do you think about making the line break persistent after if, like line breaks after a function call opener are?

Happy to submit a PR.

@DavisVaughan
Copy link
Collaborator

#340 is going to start autobracing this unconditionally, fixing a whole host of related issues, see also https://style.tidyverse.org/syntax.html#if-statements

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.

2 participants