Skip to content

Commit

Permalink
Add a pandoc_metadata_file_arg helper
Browse files Browse the repository at this point in the history
It will be useful in rticles package
  • Loading branch information
cderv committed Apr 17, 2023
1 parent a0b1183 commit fce12fb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: rmarkdown
Title: Dynamic Documents for R
Version: 2.21.2
Version: 2.21.3
Authors@R: c(
person("JJ", "Allaire", , "jj@posit.co", role = "aut"),
person("Yihui", "Xie", , "xie@yihui.name", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-0645-5666")),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
rmarkdown 2.22
================================================================================

- Add a `pandoc_metadata_file_arg()` function to match Pandoc's CLI flag `--metadata-file`.

- Mentions that **webshot** or **webshot2** is required to take screenshot of HTML widget. When not installed, an error message mentionning `always_allow_html: true` solution will be shown, but setting this is not the solution (quarto-dev/quarto-cli#4225).

rmarkdown 2.21
Expand Down
7 changes: 7 additions & 0 deletions R/pandoc.R
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,13 @@ pandoc_metadata_arg <- function(name,
c("--metadata", if (missing(value)) name else paste(name, "=", value, sep = ""))
}

#' @rdname pandoc_args
#' @export
pandoc_metadata_file_arg <- function(file) {

c("--metadata-file", pandoc_path_arg(file))
}


#' @rdname pandoc_args
#' @export
Expand Down

0 comments on commit fce12fb

Please sign in to comment.