Skip to content

Commit

Permalink
Write generated bibliography yaml to tempfile
Browse files Browse the repository at this point in the history
Fixes an issue where the same bib file is used multiple times.
  • Loading branch information
mitchelloharawild committed Jul 5, 2020
1 parent 34cea32 commit 94f4a94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/bibliography.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ knit_print.vitae_bibliography <- function(x, options) {
items <- x$key
yaml_bib <- yaml::yaml.load(rmarkdown::pandoc_citeproc_convert(path, "yaml"))$references
yaml_bib <- Filter(function(x) x$id %in% items, yaml_bib)
file <- paste0(path, ".yaml")
file <- tempfile(fileext = ".yaml")
yaml::write_yaml(list(references = yaml_bib), file = file)

startlabel <- x %@% "startlabel"
Expand Down

0 comments on commit 94f4a94

Please sign in to comment.