R/utils_qmd.R

Defines functions create_heading

create_heading <- function(x, level = NULL,
                           arg = rlang::caller_arg(x),
                           call = rlang::caller_env()) {

  check_string(x, n = NULL, null.ok = TRUE, arg = arg, call = call)
  if(is.null(level)) level <- names(x)[1]
  stringi::stri_c(ignore_null=TRUE,
    strrep("#", times=level), " ",
    x[level])
}

Try the saros.base package in your browser

Any scripts or data that you put into this service are public.

saros.base documentation built on June 8, 2025, 10:03 a.m.