From 7fb420df020c95356f4311e02fe59dab495140c8 Mon Sep 17 00:00:00 2001 From: mitchelloharawild Date: Thu, 23 Nov 2023 23:43:54 +1100 Subject: [PATCH] Fix windows file separator for processed temp bibliography path Ref #246 --- R/bibliography.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/R/bibliography.R b/R/bibliography.R index 928e75f9..a2c1f839 100644 --- a/R/bibliography.R +++ b/R/bibliography.R @@ -100,9 +100,6 @@ knit_print.vitae_bibliography <- function(x, options = knitr::opts_current$get() startlabel <- x %@% "startlabel" endlabel <- x %@% "endlabel" - # Convert file separator to format expected by citeproc - # file <- gsub("\\", "/", file, fixed = TRUE) - out <- glue( ' @@ -112,5 +109,9 @@ knit_print.vitae_bibliography <- function(x, options = knitr::opts_current$get() ', .open = "<<", .close = ">>" ) + + # Convert file separator to format expected by pandoc-citeproc on Windows + file <- gsub("\\", "/", file, fixed = TRUE) + knitr::asis_output(out, meta = list(structure(list(file = file, id = x$id), class = "vitae_nocite"))) }