Skip to content

Commit

Permalink
Specify parent.frame envir just for fun
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheiss committed May 29, 2023
1 parent 6ad2b8d commit 11719ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/tar_slides.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ render_xaringan <- function(slide_path) {
# disable it here. This is the same thing that tarchetypes::tar_render() does
# behind the scenes too.
withr::local_options(list(crayon.enabled = NULL))
rmarkdown::render(slide_path, quiet = TRUE)

rmarkdown::render(
slide_path,
envir = parent.frame(),
quiet = TRUE
)

return(paste0(tools::file_path_sans_ext(slide_path), ".html"))
}

Expand Down

0 comments on commit 11719ce

Please sign in to comment.