Skip to content

Commit 4af0b40

Browse files
add tilde spacing rule
1 parent a1527be commit 4af0b40

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

R/style_guides.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ tidyverse_style <- function(scope = "tokens",
8080
math_token_spacing$zero,
8181
math_token_spacing$one
8282
),
83+
partial(
84+
style_space_around_token, strict = strict, tokens = "'~'", level = 1),
8385
if (strict) set_space_around_op else add_space_around_op,
8486
if (strict) set_space_after_comma else add_space_after_comma,
8587
remove_space_after_opening_paren,

R/token-define.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ token <- tribble(
1919
"*" , "math" , "'*'" ,
2020
"/" , "math" , "'/'" ,
2121
"^" , "math" , "'^'" ,
22+
"~" , "formula" , "'~'" ,
2223
"if" , "cond" , "IF" ,
2324
"else" , "cond" , "ELSE" ,
2425
"in" , "loop_cond" , "IN" ,

0 commit comments

Comments
 (0)