Skip to contents

This is a simple convenience wrapper for add_toc(..., position = "none").

Usage

remove_toc(md, old_toc_id = "toc")

Arguments

md

(R) Markdown document to be processed as a single file path, a single URL or a character vector (one string per line).

old_toc_id

HTML <id> attribute of the old TOC title (in order to have old backlinks with an ID other than toc_id removed). A character scalar.

Value

The processed Markdown document as a character vector (one string per line).

See also

Examples

if (FALSE) {
tocr::remove_toc(md = paste0("https://raw.githubusercontent.com/thlorenz/doctoc/",
                             "1d386261972d35c6bcd187d0a00e666f9d893d8d/README.md")) |>
  pal::cat_lines()}