Skip to content

Keep empty line around comments #632

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
krlmlr opened this issue Apr 12, 2020 · 1 comment · Fixed by #635
Closed

Keep empty line around comments #632

krlmlr opened this issue Apr 12, 2020 · 1 comment · Fixed by #635

Comments

@krlmlr
Copy link
Member

krlmlr commented Apr 12, 2020

The empty line above the "defining b" comment should remain.

styler::style_text('
c(
  a = 1,
  
  # defining b
  b = 2
)
')
#> 
#> c(
#>   a = 1,
#>   # defining b
#>   b = 2
#> )

Created on 2020-04-12 by the reprex package (v0.3.0)

Follow-up to #630.

lorenzwalthert added a commit that referenced this issue Apr 17, 2020
- Don't remove blank lines around comments (#632).
@lorenzwalthert
Copy link
Collaborator

It's now implemented for both blank lines above and below comments. Hope that works for you.

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