Skip to content

Commit

Permalink
cosmetic style fixes (#2353)
Browse files Browse the repository at this point in the history
  • Loading branch information
salim-b committed Mar 11, 2024
1 parent 2d45e67 commit 3dffe22
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
13 changes: 8 additions & 5 deletions R/build-reference.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ build_reference <- function(pkg = ".",
topics <- purrr::transpose(pkg$topics)
}

purrr::map(topics,
purrr::map(
topics,
build_reference_topic,
pkg = pkg,
lazy = lazy,
Expand Down Expand Up @@ -269,8 +270,7 @@ build_reference_topic <- function(topic,
pkg,
lazy = TRUE,
examples_env = globalenv(),
run_dont_run = FALSE
) {
run_dont_run = FALSE ) {

in_path <- path(pkg$src_path, "man", topic$file_in)
out_path <- path(pkg$dst_path, "reference", topic$file_out)
Expand All @@ -297,12 +297,14 @@ build_reference_topic <- function(topic,
if (data$has_deps) {
deps <- bs_theme_deps_suppress(deps)
deps <- htmltools::resolveDependencies(deps)
deps <- purrr::map(deps,
deps <- purrr::map(
deps,
htmltools::copyDependencyToDir,
outputDir = file.path(pkg$dst_path, "reference", "libs"),
mustWork = FALSE
)
deps <- purrr::map(deps,
deps <- purrr::map(
deps,
htmltools::makeDependencyRelative,
basepath = file.path(pkg$dst_path, "reference"),
mustWork = FALSE
Expand All @@ -326,6 +328,7 @@ data_reference_topic <- function(topic,
pkg,
examples_env = globalenv(),
run_dont_run = FALSE) {

local_context_eval(pkg$figures, pkg$src_path)
withr::local_options(list(downlit.rdname = get_rdname(topic)))

Expand Down
18 changes: 9 additions & 9 deletions R/build.R
Original file line number Diff line number Diff line change
Expand Up @@ -415,14 +415,13 @@ build_site_external <- function(pkg = ".",
}

build_site_local <- function(pkg = ".",
examples = TRUE,
run_dont_run = FALSE,
seed = 1014,
lazy = FALSE,
override = list(),
preview = NA,
devel = TRUE
) {
examples = TRUE,
run_dont_run = FALSE,
seed = 1014,
lazy = FALSE,
override = list(),
preview = NA,
devel = TRUE) {

pkg <- section_init(pkg, depth = 0, override = override)

Expand All @@ -433,7 +432,8 @@ build_site_local <- function(pkg = ".",
init_site(pkg)

build_home(pkg, override = override, preview = FALSE)
build_reference(pkg,
build_reference(
pkg,
lazy = lazy,
examples = examples,
run_dont_run = run_dont_run,
Expand Down
3 changes: 1 addition & 2 deletions R/rd-example.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ rd2ex <- function(x, ...) {
run_examples <- function(x,
topic = "unknown",
env = globalenv(),
run_dont_run = FALSE
) {
run_dont_run = FALSE) {

if (!inherits(x, "tag")) {
x <- rd_text(x)
Expand Down

0 comments on commit 3dffe22

Please sign in to comment.