Skip to content

Commit

Permalink
Fix windows file separator for processed temp bibliography path
Browse files Browse the repository at this point in the history
Ref #246
  • Loading branch information
mitchelloharawild committed Nov 23, 2023
1 parent 738a98c commit 7fb420d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/bibliography.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
'
Expand All @@ -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")))
}

0 comments on commit 7fb420d

Please sign in to comment.