~ubuntu-branches/debian/sid/r-cran-rmarkdown/sid

« back to all changes in this revision

Viewing changes to R/md_document.R

  • Committer: Package Import Robot
  • Author(s): Andreas Tille
  • Date: 2018-03-23 08:25:44 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20180323082544-wo1jbu46ryb61sfv
Tags: 1.9+dfsg-1
* New upstream version
* Standards-Version: 4.1.3
* debhelper 11
* DEP5 fix

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
                        pandoc_args = NULL) {
62
62
 
63
63
  # base pandoc options for all markdown output
64
 
  args <- c(if (variant != "markdown" && !preserve_yaml) "--standalone")
 
64
  args <- c(if (variant != "markdown" || preserve_yaml) "--standalone")
65
65
 
66
66
  # table of contents
67
67
  args <- c(args, pandoc_toc_args(toc, toc_depth))
73
73
  args <- c(args, pandoc_args)
74
74
 
75
75
  # add post_processor for yaml preservation
76
 
  if (preserve_yaml) {
 
76
  if (preserve_yaml && variant != 'markdown') {
77
77
    post_processor <- function(metadata, input_file, output_file, clean, verbose) {
78
78
      input_lines <- readLines(input_file, warn = FALSE)
79
79
      partitioned <- partition_yaml_front_matter(input_lines)