From 70444d8d381d286f6c13071441c9039cf713d610 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Tue, 11 Jun 2024 18:52:10 +0200 Subject: [PATCH] cover_info(): collapse the corresponding email field --- R/cover_info.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/cover_info.R b/R/cover_info.R index 9854186e..4ba6e83c 100644 --- a/R/cover_info.R +++ b/R/cover_info.R @@ -21,7 +21,9 @@ cover_info <- function(path = "index.Rmd") { function(x) { ifelse(is.null(x$corresponding) || !x$corresponding, "", x$email) } - ) -> yaml_header$corresponding + ) |> + paste(collapse = ", ") |> + trimws(whitespace = "[ \t\r\n,]") -> yaml_header$corresponding vapply( yaml_header$author, FUN.VALUE = character(1), FUN = function(author) {