Skip to content

Commit

Permalink
Use modify_list() everywhere (#2570)
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley authored May 21, 2024
1 parent eae8c58 commit 6757fe4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/build-articles.R
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ build_article <- function(name,
output_file = output_file,
as_is = as_is
)
data <- utils::modifyList(default_data, data)
data <- modify_list(default_data, data)

if (as_is) {
format <- NULL
Expand Down
4 changes: 2 additions & 2 deletions R/figure.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ meta_figures <- function(meta = list()) {
default <- fig_save_args()
figures <- purrr::pluck(meta, "figures", .default = list())

print_yaml(utils::modifyList(default, figures))
print_yaml(modify_list(default, figures))
}

#' Get current settings for figures
Expand Down Expand Up @@ -123,7 +123,7 @@ fig_opts_chunk <- function(figures, default) {
figures$dev.args <- figures$dev.args %||% list()
figures$dev.args$bg <- figures$bg %||% NA

utils::modifyList(default, figures)
modify_list(default, figures)
}

# Find graphics device ----------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion R/render.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ render_page <- function(pkg = ".", name, data, path, depth = NULL, quiet = FALSE
}

render_page_html <- function(pkg, name, data = list(), depth = 0L) {
data <- utils::modifyList(data_template(pkg, depth = depth), data)
data <- modify_list(data_template(pkg, depth = depth), data)

# render template components
pieces <- c(
Expand Down

0 comments on commit 6757fe4

Please sign in to comment.