Skip to contents

Removes all Markdown footnotes from a character vector.

Usage

strip_md_footnotes(x)

Arguments

x

A character vector to strip Markdown footnotes from. Note that elements in x are processed as separate Markdown domains, i.e. not as individual lines belonging to the same Markdown document.

Value

A character vector of the same length as x.

Details

Note that it is not checked whether footnote references and definitions actually match (by identifier), thus they are removed even if they were invalid.

See also

Other (Pandoc) Markdown functions: as_md_list(), as_md_val_list(), as_md_vals(), md_verb(), pipe_table(), strip_md()

Examples

pal::strip_md_footnotes(
  "An **MD** formatted string with footnote[^fn].\n\n[^fn]: A note.\n"
)
#> [1] "An **MD** formatted string with footnote."