#' Trim multiple leading and trailing whitespace
#'
#' @param x the object whose whitespace should be trimmed
#' @keywords internal
trim_multiple_leading_trailing_ws <- function(x) {
stringr::str_replace(
gsub("(?<=[\\s])\\s*|^\\s+|\\s+$", "", x, perl = TRUE),
"^$", NA_character_
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.