You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this going to have effects beyond reprex in the knitr-verse and I can maybe rely on it getting "fixed" in knitr? (Caveat: this is a quick reaction to this issue, not based on actual exploration yet.)
The bottom issue is because --standalone pandoc arg is passed in the command line. That is what makes the yaml header added with this new yaml_metadata_block extension activated by default.
So on rmarkdown side I think the correct fix is that rmarkdown::md_document("gfm", preserve_yaml = FALSE) should remove the new extension yaml_metadata_block. Currently md_document() is assuming Pandoc does not add yaml block except for markdown format.
However, on reprex side, I think you will need to deal with it even with a fix in rmarkdown because you are not using rmarkdown::github_document() or rmarkdown::md_document("gfm"). You are using default md_document() as based format
This means that you inherit the argument for Pandoc for the default behavior of md_document() which is equivalent to md_document(variant = "markdown_strict") and this insert the --standalone arg you don't want. That is what is causing the issue.
In the first place, I think reprex should use rmarkdown::md_document("gfm") as base format, and with a fix in rmarkdown this should work as expected.
If you want a workaround in the meantime without waiting for a new rmarkdown version, I think you can deactivate the extension in your format directly and that would work