Skip to content

Commit

Permalink
Use reprex's own CSS and html template
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Sep 4, 2024
1 parent 05dd7e3 commit 1a6f0d1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions R/reprex_render.R
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,18 @@ reprex_render_impl <- function(input,

# heavily influenced by the post_processor() function of github_document()
preview <- function(input) {
mode <- if (is_dark_mode()) "dark" else "light"
css <- rmarkdown::pandoc_path_arg(
path_package(
"rmarkdown",
"rmarkdown/templates/github_document/resources/github.css"
"reprex",
glue("rmarkdown/templates/reprex_document/resources/github-{mode}.css")
)
)
css <- glue("github-markdown-css:{css}")
template <- rmarkdown::pandoc_path_arg(
path_package(
"rmarkdown",
"rmarkdown/templates/github_document/resources/preview.html"
"reprex",
"rmarkdown/templates/reprex_document/resources/preview.html"
)
)
args <- c(
Expand Down

0 comments on commit 1a6f0d1

Please sign in to comment.