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
According to the pandoc documentation, yaml metadata is only written to markdown output if --standalone is used:
When pandoc is used with -t markdown to create a Markdown document, a YAML metadata block will be produced only if the -s/--standalone option is used. All of the metadata will appear in a single block at the beginning of the document.
As a result, downlit::downlit_md_path() discards YAML metadata when run on markdown files. This prevents me from performing markdown -> downlit -> markdown conversions.
The result of setting --standalone is:
When the -s/--standalone option is used, pandoc uses a template to add header and footer material that is needed for a self-standing document. To see the default template that is used, just type pandoc -D *FORMAT*
If I call system2(rmarkdown::pandoc_exec(), "-D gfm") or system2(rmarkdown::pandoc_exec(), "-D markdown_github"), I get a barebones template which should not otherwise affect the md output.
I am running into similar issue here except in the context of HTML. I am using downlit to add autolinking to a rendered html document. It is only a partial html file but downlit adds the <html><body> tags
This is an excerpt of my current code. The output of pandoc does not have the tags, but using downlit adds them.
According to the pandoc documentation, yaml metadata is only written to markdown output if
--standalone
is used:As a result,
downlit::downlit_md_path()
discards YAML metadata when run on markdown files. This prevents me from performing markdown -> downlit -> markdown conversions.The result of setting --standalone is:
If I call
system2(rmarkdown::pandoc_exec(), "-D gfm")
orsystem2(rmarkdown::pandoc_exec(), "-D markdown_github")
, I get a barebones template which should not otherwise affect the md output.The text was updated successfully, but these errors were encountered: