Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Rendering the TOC with Sundown\Markdown #18

Closed
stof opened this Issue · 1 comment

2 participants

@stof

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

@chobie
Owner

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.

1dbfb0a...1e3bf31

<?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

@stof stof closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.