markdown/slide

(require("markdown/slide"))(md, optsopt)

Marpit slide plugin.

Split markdown-it tokens into the slides by horizontal rule. Each slides will be wrapped by section element.

Source:
Parameters:
Name Type Attributes Description
md MarkdownIt

markdown-it instance.

opts Object <optional>
Name Type Attributes Default Description
attributes Object <optional>

The <section> element attributes by key-value pairs.

anchor boolean | anchorCallback <optional>
true

If true, assign the anchor with the page number starting from 1. You can customize anchor name by passing callback function.

Type Definitions

anchorCallback(index) → {string}

Convert slide page index into anchor string.

Source:
Parameters:
Name Type Description
index number

Slide page index, beginning from zero.

Returns:
Type:
string

The text of anchor/id attribute (without prefix #).