Skip to content

Commit

Permalink
set the option in the pre_knit hook instead
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Mar 18, 2022
1 parent 551bd7a commit 08455bc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/render.R
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,15 @@ moon_reader = function(
)
}

# don't use Pandoc raw blocks ```{=} (#293)
opts = options(htmltools.preserve.raw = FALSE)
opts = list()

rmarkdown::output_format(
rmarkdown::knitr_options(knit_hooks = highlight_hooks),
NULL, clean_supporting = self_contained,
pre_knit = function(input, ...) {
# don't use Pandoc raw blocks ```{=} (#293)
opts <<- options(htmltools.preserve.raw = FALSE)
}
pre_processor = function(
metadata, input_file, runtime, knit_meta, files_dir, output_dir
) {
Expand Down

0 comments on commit 08455bc

Please sign in to comment.