Skip to content

Commit

Permalink
fix #656: do not use --standalone when variant = 'markdown' and perse…
Browse files Browse the repository at this point in the history
…rve_yaml = TRUE in md_document()
  • Loading branch information
yihui committed Oct 24, 2017
1 parent fa23a72 commit 797c7fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/md_document.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ md_document <- function(variant = "markdown_strict",
pandoc_args = NULL) {

# base pandoc options for all markdown output
args <- c("--standalone")
args <- c(if (variant != "markdown" && !preserve_yaml) "--standalone")

# table of contents
args <- c(args, pandoc_toc_args(toc, toc_depth))
Expand Down
3 changes: 3 additions & 0 deletions inst/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ rmarkdown 1.7 (unreleased)

* rmarkdown is compatible with Pandoc 2.0 (not released yet) now (#1120).

* For `md_document()`, when `variant == 'markdown'` and `perserve_yaml = TRUE`,
the Pandoc argument `--standalone` should not be used (#656).

rmarkdown 1.6
--------------------------------------------------------------------------------

Expand Down

0 comments on commit 797c7fa

Please sign in to comment.