diff --git a/R/to_md.R b/R/to_md.R index be5c909..07bdc6e 100644 --- a/R/to_md.R +++ b/R/to_md.R @@ -61,7 +61,9 @@ to_md <- function(yaml_xml_list, path = NULL, stylesheet_path = stylesheet()){ transform_to_md <- function(body, yaml, stylesheet) { body <- xslt::xml_xslt(body, stylesheet = stylesheet) - yaml <- glue::glue_collapse(yaml, sep = "\n") + if (length(yaml) > 0) { + yaml <- glue::glue_collapse(yaml, sep = "\n") + } c(yaml, body) }