File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
tests/testthat/unindention Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -231,13 +231,14 @@ remove_line_break_before_round_closing_after_curly <- function(pd) {
231231
232232remove_line_breaks_in_fun_dec <- function (pd ) {
233233 if (is_function_declaration(pd )) {
234+ is_double_indention <- is_double_indent_function_declaration(pd )
234235 round_after <- (
235236 pd $ token == " ')'" | pd $ token_before == " '('"
236237 ) &
237238 pd $ token_before != " COMMENT"
238239 pd $ lag_newlines [pd $ lag_newlines > 1L ] <- 1L
239240 pd $ lag_newlines [round_after ] <- 0L
240- if (is_double_indent_function_declaration( pd ) ) {
241+ if (is_double_indention ) {
241242 pd $ lag_newlines [lag(pd $ token == " '('" )] <- 1L
242243 }
243244 }
Original file line number Diff line number Diff line change @@ -58,7 +58,8 @@ function(
5858}
5959
6060
61- function (x , y ) {
61+ function (
62+ x , y ) {
6263 1
6364}
6465
@@ -70,9 +71,15 @@ function(x,
7071
7172
7273# last brace
73- function (x , y ) NULL
74+ function (
75+ x , y ) {
76+ NULL
77+ }
7478
75- function (x , y ) NULL
79+ function (
80+ x , y ) {
81+ NULL
82+ }
7683
7784function (
7885 x ,
You can’t perform that action at this time.
0 commit comments