Skip to content

Commit

Permalink
deactivate extension about yaml metadata block for pandoc 2.13+ (#383)
Browse files Browse the repository at this point in the history
* deactivate extension about yaml metadata block for pandoc 2.13+

* Leave an explanatory comment

* Add NEWS bullet

Co-authored-by: Jenny Bryan <[email protected]>
  • Loading branch information
cderv and jennybc authored Jul 21, 2021
1 parent 5cf02b4 commit 293225e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# reprex (development version)

`reprex_document()` has been adjusted for compatibility with changes introduced in Pandoc 2.13 around YAML headers (#375, #383 @cderv).

`reprex_rtf()` (and the unexported `prex_rtf()`) work again.
One of the filepaths involved in the highlight call was borked, but now it's not (#379).

Expand Down
3 changes: 2 additions & 1 deletion R/reprex_document.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ reprex_document <- function(venue = c("gh", "r", "rtf", "html", "slack", "so", "
opts_chunk = opts_chunk
),
pandoc = rmarkdown::pandoc_options(
to = "gfm",
# https://github.com/tidyverse/reprex/issues/375
to = paste0("gfm", if (rmarkdown::pandoc_available("2.13")) "-yaml_metadata_block"),
from = rmarkdown::from_rmarkdown(implicit_figures = FALSE),
ext = ".md",
args = pandoc_args
Expand Down

0 comments on commit 293225e

Please sign in to comment.