tagger: Surrounds text with tags unless empty

View source: R/formatting.R

taggerR Documentation

Surrounds text with tags unless empty

Description

Surrounds text with tags unless empty

Usage

tagger(x, tag = "<span>", right_tag = gsub("^<", "</", tag))

bold_md(x)

italic_md(x)

superscript_md(x)

subscript_md(x)

header_md(x, level = 1)

Arguments

x

character vector

tag

opening tag, e.g., ⁠<span>⁠

right_tag

closing tag, e.g., ⁠</span>⁠. Defaults to the same value as the opening tag.

level

heading level

Value

character vector

Examples

x <- c("hello", "", NA)
tagger(x, "<span>")
bold_md(x)
italic_md(x)
superscript_md(x)
subscript_md(x)
header_md("Level 1")
header_md("Level 2", 2)

apa7 documentation built on May 26, 2026, 5:07 p.m.