Skip to content

Commit

Permalink
Drop malformed Authors@R spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisaloo committed Feb 3, 2025
1 parent c3fd438 commit fc9486d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/parse_authors_r.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ parse_authors_r <- function(authors_r_string) {
)

authors_persons <- lapply(str2expression(authors_r_string), eval)


# Malformed Authors@R field
is_person <- vapply(authors_persons, \(x) inherits(x, "person"), logical(1))
authors_persons[!is_person] <- NA

# Drop extra comments
authors_persons[!is.na(authors_persons)] <- lapply(
authors_persons[!is.na(authors_persons)],
Expand Down

0 comments on commit fc9486d

Please sign in to comment.