Create the link labels that can latter be referred to with a link reference
from md_reference().
Arguments
- text
The text in the document to be hyperlinked.
- label
A link label that is referenced elsewhere in the document. If
NULL(the default), a collapsed reference link[text][]is produced.- ...
A sequence of
label = "text"named vector pairs. If any such pairs are provided,.namewill be consideredTRUE.- .name
logical; if
TRUE, the pairs in...will be used instead of any values supplied toxandurl.
Value
A single glue vector of length equal to that of label and url,
with elements the concatenated arguments.
Details
A link label begins with a left bracket and ends with the first right bracket that is not backslash-escaped. Between these brackets there must be at least one non-whitespace character.
When label is omitted, a collapsed reference link ([text][]) is
produced. The link label is then implicitly the same as the link text
(matched case-insensitively), so a matching md_reference() definition
must use the same text as its label.
See also
Other leaf block functions:
md_blank(),
md_chunk(),
md_fence(),
md_heading(),
md_indent(),
md_paragraph(),
md_reference(),
md_rule(),
md_setext(),
md_table()
Examples
md_label(CRAN = "The CRAN website")
#> [The CRAN website][CRAN]
md_label(text = c("one", "two"), label = 1:2)
#> [one][1]
#> [two][2]
md_label("CRAN")
#> [CRAN][]
