-
Notifications
You must be signed in to change notification settings - Fork 81
Closed
Description
With pandoc 2.12 this works as expected.
tmp <- fs::dir_create(fs::file_temp())
reprex::reprex(input = "rmarkdown::pandoc_version()\n", venue = "gh", wd = tmp, advertise = FALSE)
readLines(fs::dir_ls(tmp, glob = "*md"))
#> [1] "``` r" "rmarkdown::pandoc_version()"
#> [3] "#> [1] '2.12'" "```"
With pandoc 2.13 we get the YAML header as well
tmp <- fs::dir_create(fs::file_temp())
reprex::reprex(input = "rmarkdown::pandoc_version()\n", venue = "gh", wd = tmp, advertise = FALSE)
readLines(fs::dir_ls(tmp, glob = "*md"))
#> [1] "---" "author: jhester"
#> [3] "date: 2021-04-28" "output:"
#> [5] " reprex::reprex_document:" " advertise: false"
#> [7] "title: legal-mink\\_reprex.R" "---"
#> [9] "" "``` r"
#> [11] "rmarkdown::pandoc_version()" "#> [1] '2.13'"
#> [13] "```"
Created on 2021-04-28 by the reprex package (v2.0.0)
It looks like this is fallout from jgm/pandoc#6537, pandoc now parses the YAML header for GFM, before it was silently discarded.
I think likely reprex will have to either remove the header from the input file it sends to pandoc, or remove it from the output after the fact.
Metadata
Metadata
Assignees
Labels
No labels