src/TocGenerator.php
public function getHtmlMenu($markup, $topLevel = 1, $depth = 6, RendererInterface $renderer = null)
    {
        if ( ! $renderer) {
            $renderer = new ListRenderer(new Matcher(), [
                'currentClass'  => 'active',
                'ancestorClass' => 'active_ancestor'
            ]);
        }

        return $renderer->render($this->getMenu($markup, $topLevel, $depth));
    }
public function getHtmlMenu($markup, $topLevel = 1, $depth = 6, RendererInterface $renderer = null)
    {
        if ( ! $renderer) {
            $renderer = new ListRenderer(new Matcher(), [
                'currentClass'  => 'active',
                'ancestorClass' => 'active_ancestor'
            ]);
        }

        return $renderer->render($this->getMenu($markup, $topLevel, $depth));
    }
Get HTML Links in list form

@param string            $markup   Content to get items from
@param int               $topLevel Top Header (1 through 6)
@param int               $depth    Depth (1 through 6)
@param RendererInterface $renderer
@return string HTML <LI> items