From 450fb32aa3e2ae6a5a34db746737a20e5a057b2e Mon Sep 17 00:00:00 2001 From: Casey McLaughlin Date: Thu, 22 Jan 2015 20:40:08 -0500 Subject: [PATCH] Fixed default depth on Twig extensions --- src/TocTwigExtension.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/TocTwigExtension.php b/src/TocTwigExtension.php index 6d39121..193a612 100644 --- a/src/TocTwigExtension.php +++ b/src/TocTwigExtension.php @@ -66,7 +66,7 @@ class TocTwigExtension extends Twig_Extension { $filters = parent::getFilters(); - $filters[] = new \Twig_SimpleFilter('add_anchors', function($str, $top = 1, $depth = 2) { + $filters[] = new \Twig_SimpleFilter('add_anchors', function($str, $top = 1, $depth = 6) { return $this->fixer->fix($str, $top, $depth); }, ['is_safe' => ['html']]); @@ -84,17 +84,17 @@ class TocTwigExtension extends Twig_Extension // ~~~ - $functions[] = new \Twig_SimpleFunction('toc', function($markup, $top = 1, $depth = 2) { + $functions[] = new \Twig_SimpleFunction('toc', function($markup, $top = 1, $depth = 6) { return $this->generator->getHtmlMenu($markup, $top, $depth); }, ['is_safe' => ['html']]); // ~~~ - $functions[] = new \Twig_SimpleFunction('toc_items', function($markup, $top = 1, $depth = 2) { + $functions[] = new \Twig_SimpleFunction('toc_items', function($markup, $top = 1, $depth = 6) { return $this->generator->getMenu($markup, $top, $depth); }); - $functions[] = new \Twig_SimpleFunction('add_anchors', function($markup, $top = 1, $depth =2) { + $functions[] = new \Twig_SimpleFunction('add_anchors', function($markup, $top = 1, $depth = 6) { return $this->fixer->fix($markup, $top, $depth); }, ['is_safe' => ['html']]);