diff --git a/R/cff_create_person.R b/R/cff_create_person.R index 089eaf8a..579cf0f7 100644 --- a/R/cff_create_person.R +++ b/R/cff_create_person.R @@ -230,7 +230,7 @@ hint_person <- function(person) { ) { # guess orcid norc <- min(unlist(regexpr("orcid.org/", comment_as_text))) - if (orc_text < 0) { + if (norc < 0) { parsed_comments <- list() } else { orcid <- substr(comment_as_text, norc, nchar(comment_as_text)) @@ -287,6 +287,7 @@ hint_person <- function(person) { hint_bibtex <- function(person) { person <- trimws(person) + person <- unname(person) # Remove role on [] as it comes from print.person by default person <- gsub("\\[[^()]*\\]", "", person) diff --git a/R/parse_citation.R b/R/parse_citation.R index 8f841147..b38f4619 100644 --- a/R/parse_citation.R +++ b/R/parse_citation.R @@ -139,6 +139,9 @@ building_other_persons <- function(parsed_fields) { toentity_pers <- others[names(others) %in% toent_pers] toentity_pers <- lapply(toentity_pers, function(x) { bibtex <- paste(x, collapse = " and ") + # Unname + names(bibtex) <- NULL + end <- cff_parse_person_bibtex(bibtex)