Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deactivate extension about yaml metadata block for pandoc 2.13+ #383

merged 3 commits into from Jul 21, 2021


Copy link

@cderv cderv commented Jul 20, 2021

This fixes #375 on reprex side fro now

As explained in #375 (comment), we need to make a fix for Pandoc's change in rmarkdown but I am not sure reprex would benefit from it directly because of the way the reprex_document() format is built. By not using the variant= argument in md_document(), any variant specific logic for gfm inside rmarkdown::md_document() would not be applied.

For a quick fix on reprex side, I have just added a switch to get Pandoc's extension deactivated for version 2.13 and above. This extension yaml_metadata_block has been activated by default in Pandoc now. This change in reprex does not require a new rmarkdown version.

I did not add tests for now. I wanted to wait for your guidance about how you would like it to be in your test organization. And also because tests in reprex that runs Pandoc are currently already failing with recent Pandoc versions. However, you don't test several Pandoc versions for now in GHA, only 2.7.3 (the default for r-lib/actions/setup-pandoc).

Happy to discuss it further and work on another way to fix it (with a fix in rmarkdown and a change in reprex)

Copy link

krlmlr commented Jul 20, 2021

Confirming that this fixes my problems with pandoc 2.13 on my M1 mac, CC @jennybc.

Copy link

jennybc commented Jul 21, 2021


@jennybc jennybc merged commit 293225e into tidyverse:master Jul 21, 2021
@cderv cderv deleted the fix/yaml-block-gfm branch July 21, 2021 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Pandoc versions 2.13+ include the yaml header in the output for GFM
3 participants