Rendering the TOC with Sundown\Markdown #18

stof opened this Issue May 3, 2012 · 1 comment


None yet

2 participants

stof commented May 3, 2012

The simple Sundown class has a toTOC method to render the TOC. Is there a similar method for the dvanced markdown parser ?

chobie commented May 4, 2012

thanks spotting the issue. I'm forget about that.

I implemented that in current development branch. I'll publish it to PECL in this weekend.


$sd = new Sundown\Markdown(new Sundown\Render\HTML_TOC());
$data = "# helo

lorem ipsum dolar sit amet

## world

lorem ipsum dolar sit amet

echo $sd->render($data);
$sd->setRender(new Sundown\Render\HTML(array("with_toc_data"=>true)));
echo "\n";
echo $sd->render($data);


@stof stof closed this May 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment