Closed stof closed 12 years ago
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.
https://github.com/chobie/php-sundown/compare/1dbfb0a6...1e3bf311
<?php
$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);
Thanks
The simple Sundown class has a toTOC method to render the TOC. Is there a similar method for the dvanced markdown parser ?