diff --git a/NEWS.md b/NEWS.md index 00beb188..ba01c182 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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). diff --git a/R/reprex_document.R b/R/reprex_document.R index 9d5a9910..b61f6066 100644 --- a/R/reprex_document.R +++ b/R/reprex_document.R @@ -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