Skip to content

Commit

Permalink
remove use of pandoc_path_arg for highlight theme
Browse files Browse the repository at this point in the history
spaces can be in filepath on Windows
rstudio/rmarkdown#1976
  • Loading branch information
cderv committed Dec 9, 2020
1 parent 4be55c4 commit 2142d6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/distill_article.R
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,14 @@ distill_highlighting_args <- function(highlight) {
#
# https://github.com/jgm/skylighting/blob/a1d02a0db6260c73aaf04aae2e6e18b569caacdc/skylighting-core/src/Skylighting/Format/HTML.hs#L117-L147
#
default <- pandoc_path_arg(distill_resource("arrow.theme"))
default <- distill_resource("arrow.theme"))

# if it's "rstudio", then use an embedded theme file
if (identical(highlight, "rstudio")) {
highlight <- pandoc_path_arg(distill_resource("rstudio.theme"))
highlight <- distill_resource("rstudio.theme")
}

pandoc_highlight_args(highlight, default)
rmarkdown::pandoc_highlight_args(highlight, default)
}

knitr_preview_hook <- function(options) {
Expand Down

0 comments on commit 2142d6a

Please sign in to comment.