evilstreak / markdown-js

A Markdown parser for javascript
7.69k stars 863 forks source link

Toc helper not working on Maruku #286

Closed thetutlage closed 6 years ago

thetutlage commented 7 years ago

I am trying to use Maruku dialect but the {:toc} helper doesn't work me.

Input

const text = `* This list will contain the toc (it doesn't matter what you write here)
{:toc}
# This is heading
content

## This is subheading
content
`

markdown.toHTML(text, 'Maruku')

Output

<ul><li>This list will contain the toc (it doesn&#39;t matter what you write here)</li></ul>
<h1>This is heading</h1>
<p>content</p>
<h2>This is subheading</h2>
<p>content</p>