Skip to content

Commit

Permalink
Try fixing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Feb 28, 2024
1 parent 44dc4d4 commit fe36c20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/cff_create_person.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Check warning on line 234 in R/cff_create_person.R

View check run for this annotation

Codecov / codecov/patch

R/cff_create_person.R#L232-L234

Added lines #L232 - L234 were not covered by tests
} else {
orcid <- substr(comment_as_text, norc, nchar(comment_as_text))
Expand Down Expand Up @@ -287,6 +287,7 @@ hint_person <- function(person) {

hint_bibtex <- function(person) {
person <- trimws(person)
person <- unname(person)

Check warning on line 290 in R/cff_create_person.R

View check run for this annotation

Codecov / codecov/patch

R/cff_create_person.R#L289-L290

Added lines #L289 - L290 were not covered by tests

# Remove role on [] as it comes from print.person by default
person <- gsub("\\[[^()]*\\]", "", person)

Check warning on line 293 in R/cff_create_person.R

View check run for this annotation

Codecov / codecov/patch

R/cff_create_person.R#L293

Added line #L293 was not covered by tests
Expand Down
3 changes: 3 additions & 0 deletions R/parse_citation.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit fe36c20

Please sign in to comment.