Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Dec 20, 2024
1 parent 7525889 commit d5f1865
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions R/rules-line-breaks.R
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,8 @@ set_line_breaks_for_multiline_args <- function(pd) {
}

has_children <- purrr::some(pd$child, purrr::negate(is.null))
is_function_definition <- pd$token[1L] == "FUNCTION"

if (!has_children || is_function_definition) {
if (!has_children || is_function_declaration(pd)) {
return(pd)
}

Expand Down
3 changes: 1 addition & 2 deletions tests/testthat/test-cache-high-level-api.R
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ test_that("avoid removing roxygen mask (see commit messages in #584)", {
"#'",
"#' @examples",
"#' c(",
"#' 1,",
"#' 2,",
"#' 1, 2,",
"#' x - 2",
"#' )",
"#' x",
Expand Down

0 comments on commit d5f1865

Please sign in to comment.