-
Notifications
You must be signed in to change notification settings - Fork 72
Closed
Description
styler removes spaces before $
but not after:
library(styler)
# OK
style_text("mtcars $disp")
#> mtcars$disp
# Not OK
style_text("mtcars$ disp")
#> mtcars$ disp
style_text("mtcars $ disp")
#> mtcars$ disp
Created on 2024-12-06 with reprex v2.1.1
According to section 2.2.4 of the tidyverse style guide, $
"should never be surrounded by spaces":
There are a few exceptions, which should never be surrounded by spaces:
- The operators with high precedence:
::
,:::
,$
,@
,[
,[[
,^
, unary-
, unary+
, and:
.
I used styler 1.10.3.9000, 2f1cc9b.
Metadata
Metadata
Assignees
Labels
No labels