]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/toc.pm
remove cruft
[ikiwiki.git] / IkiWiki / Plugin / toc.pm
index 639cae4a90e88d437824f51689824fa1b30e95ca..460837b1d44587928702198a2fa38110ad6b76cd 100644 (file)
@@ -7,14 +7,23 @@ use strict;
 use IkiWiki 2.00;
 use HTML::Parser;
 
-sub import { #{{{
+sub import {
+       hook(type => "getsetup", id => "toc", call => \&getsetup);
        hook(type => "preprocess", id => "toc", call => \&preprocess);
        hook(type => "format", id => "toc", call => \&format);
-} # }}}
+}
+
+sub getsetup () {
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+}
 
 my %tocpages;
 
-sub preprocess (@) { #{{{
+sub preprocess (@) {
        my %params=@_;
 
        if ($params{page} eq $params{destpage}) {
@@ -31,9 +40,9 @@ sub preprocess (@) { #{{{
                # right.
                return "";
        }
-} # }}}
+}
 
-sub format (@) { #{{{
+sub format (@) {
        my %params=@_;
        my $content=$params{content};