mmark-ext-0.2.1.2: Commonly useful extensions for the MMark markdown processor

Copyright© 2017–2018 Mark Karpov
LicenseBSD 3 clause
MaintainerMark Karpov <markkarpov92@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Text.MMark.Extension.TableOfContents

Description

Place this markup in markdown document where you want table of contents to be inserted:

```toc
```

You may use something different than "toc" as the info string of the code block.

Synopsis

Documentation

data Toc Source #

An opaque type representing table of contents produced by the tocScanner scanner.

tocScanner Source #

Arguments

:: (Int -> Bool)

Whether to include a header of this level (1–6)

-> Fold Bni Toc 

The scanner builds table of contents Toc that can then be passed to toc to obtain an extension that renders the table of contents in HTML.

toc Source #

Arguments

:: Text

Label of the code block to replace by the table of contents

-> Toc

Previously generated by tocScanner

-> Extension 

Create an extension that replaces a certain code block with previously constructed table of contents.