heading.Rd
This is just a convenience function to print a markdown or HTML heading at a given 'depth'.
heading(
...,
headingLevel = metabefor::opts$get("defaultHeadingLevel"),
output = "markdown",
cat = TRUE
)
The heading text: pasted together with no separator.
The level of the heading; the default can be set
with e.g. ufs::opts$set(defaultHeadingLevel=1)
.
Whether to output to HTML ("html
") or markdown (anything
else).
Whether to cat (print) the heading or just invisibly return it.
The heading, invisibly.
heading("Hello ", "World", headingLevel=5);
#>
#>
#> ##### Hello World
#>
### This produces: "\n\n##### Hello World\n\n"