NAME

App::Dapper::Markdown - Convert Markdown to HTML, with fenced code blocks.

DESCRIPTION

Dapper uses Text::MultiMarkdown for Markdown. On top of it, this module adds fenced code blocks, which MultiMarkdown does not understand:

```perl
print "Hello, world!\n";
```

A fenced block (with three or more backticks or tildes) becomes <pre><code class="language-perl">, with its contents HTML-escaped and left untouched by Markdown. The language-* class is what client-side highlighters such as Prism and highlight.js look for.

It also expands components such as ::: note and ::: youtube; see App::Dapper::Components.

to_html

Takes Markdown text and returns HTML. Options (a hash reference) are passed to "expand" in App::Dapper::Components.

code_block

Takes the code and (optionally) its language, and returns the HTML for a code block.