Skip to content

Commit afe7d54

Browse files
committed
don't add space at EOL in comments
1 parent f7b835a commit afe7d54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/nested.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ set_spaces <- function(spaces_after_prefix, force_one) {
130130
if (force_one) {
131131
n_of_spaces <- rep(1, length(spaces_after_prefix))
132132
} else {
133-
n_of_spaces <- if_else(spaces_after_prefix < 1L, 1L, spaces_after_prefix)
133+
n_of_spaces <- pmax(spaces_after_prefix, 1L)
134+
n_of_spaces[spaces_after_prefix == 0L] <- 0L
134135
}
135136
n_of_spaces
136137
}

0 commit comments

Comments
 (0)