summaryrefslogtreecommitdiff
path: root/doc/todo
diff options
context:
space:
mode:
authorhttp://kerravonsen.dreamwidth.org/ <http://kerravonsen.dreamwidth.org/@web>2009-12-07 01:03:37 -0500
committerJoey Hess <joey@kitenet.net>2009-12-07 01:03:37 -0500
commit1370a26030599dc2f7cbeb3df714e7935860e436 (patch)
treebc19fc38210e737974dd674838b6ec147fa01a68 /doc/todo
parentc3ae09056d6ee9880d8cd118e98282f1a3655fe6 (diff)
show you the code!
Diffstat (limited to 'doc/todo')
-rw-r--r--doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn
index 547c7a80a..318375660 100644
--- a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn
+++ b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn
@@ -1,3 +1,20 @@
It would be nice if the [[plugins/toc]] plugin let you specify a header level "ceiling" above which (or above and including which) the headers would not be incorporated into the toc.
Currently, the levels=X parameter lets you tweak how deep it will go for small headers, but I'd like to chop off the h1's (as I use them for my page title) -- [[Jon]]
+
+> This change to toc.pm should do it. --[[KathrynAndersen]]
+
+ 56,57c56,57
+ < my $startlevel=($params{startlevel} ? $params{startlevel} : 0);
+ < my $curlevel=$startlevel-1;
+ ---
+ > my $curlevel;
+ > my $startlevel=0;
+ 70d69
+ < # unless we're given startlevel as a parameter
+ 75,79d73
+ < elsif (defined $params{startlevel}
+ < and $level < $params{startlevel})
+ < {
+ < return;
+ < }