Skip to content

Commit

Permalink
cosmetic style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
salim-b committed Oct 17, 2023
1 parent 6638331 commit 79e46a2
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 @@ -185,7 +185,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 @@ -262,8 +263,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 Down Expand Up @@ -294,12 +294,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 @@ -323,6 +325,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 @@ -413,14 +413,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 @@ -431,7 +430,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 79e46a2

Please sign in to comment.