get_toc: Get a table of contents

Description Usage Arguments Examples

Description

Get a table of contents

Usage

1
2
3
4
5
get_toc(target = ".", ext = ".md", link_prefix = ".", skip = NULL)

get_toc_file(file, link_prefix)

get_toc_text(text, file = character(0), link_prefix = ".", split = FALSE)

Arguments

target

directory to scan for files

ext

file extension

link_prefix

used to link between toc and file

skip

character vector of file names to skip

file

the name of a file for building toc

text

to parse

split

logical; if TRUE, text will be split on newline prior to processing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
text <- '
How to Ski!
==============
This document will teach you how to ski.  First, find snow.

## Finding some snow
To find snow, it is best to go somewhere cold.

### Cold places in the United States
Try Minnesota. It is pretty code there.
'
get_toc_text(text)

kylebmetrum/mdcontent documentation built on May 21, 2019, 2:26 a.m.