Skip to content

Commit

Permalink
Ensures that DOIs with lower and upper case letters are matched in re…
Browse files Browse the repository at this point in the history
…place_doi_citations.
  • Loading branch information
crsh committed Oct 8, 2024
1 parent 57af39c commit 7104b4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/replace_doi.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ replace_doi_citations <- function(rmd, bib = NULL) {
readLines_utf8(con = rmd)
, setNames(
paste0("@", names(entries))
, paste0("@(doi:|DOI:|(https://)*doi.org/)*", entries)
, paste0("@(doi:|DOI:|(https://)*doi.org/)*((", toupper(entries), ")|(", tolower(entries), "))")
)
) |>
writeLines(con = rmd, useBytes = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion man/replace_doi_citations.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7104b4d

Please sign in to comment.