Skip to content

Commit

Permalink
Import functions from rmarkdown
Browse files Browse the repository at this point in the history
  • Loading branch information
paulnorthrop committed Apr 11, 2024
1 parent dfbdacb commit 243c673
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
19 changes: 17 additions & 2 deletions R/accessr-internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ ioslides_presentation_accessr <- function(number_sections = FALSE,
# pagedtables
if (identical(df_print, "paged")) {
extra_dependencies <- append(extra_dependencies,
list(html_dependency_pagedtable()))
list(rmarkdown::html_dependency_pagedtable()))

}

Expand Down Expand Up @@ -320,7 +320,9 @@ ioslides_presentation_accessr <- function(number_sections = FALSE,

# number sections
if (number_sections)
args <- c(args, pandoc_lua_filter_args(pkg_file_lua("number-sections.lua")))
args <- c(args,
rmarkdown::pandoc_lua_filter_args(
rmarkdown::pkg_file_lua("number-sections.lua")))
lua_writer <- file.path(dirname(input_file), "ioslides_presentation.lua")
# The input directory may not be writable (on e.g. Shiny Server), so write
# to the output directory in this case. We don't always do this since
Expand Down Expand Up @@ -642,3 +644,16 @@ process_html_res <- function(html, reg, processor) {
})
html
}

#' @keywords internal
#' @rdname accessr-internal
stop2 <- function(...) stop(..., call. = FALSE)

# A variant of relative_to that normalizes its inputs.
#' @keywords internal
#' @rdname accessr-internal
normalized_relative_to <- function(dir, file) {
relative_to(
normalize_path(dir, must_work = FALSE),
normalize_path(file, must_work = FALSE))
}
6 changes: 6 additions & 0 deletions man/accessr-internal.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 243c673

Please sign in to comment.