X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/4895955ceaf264c5f17b10c4009e1ab1afcc55ee..b72780e70b54bef4fd7fa52a3d2f221b9b4a46d4:/IkiWiki/Plugin/toc.pm?ds=sidebyside
diff --git a/IkiWiki/Plugin/toc.pm b/IkiWiki/Plugin/toc.pm
index 063e66f3b..bc62f71d6 100644
--- a/IkiWiki/Plugin/toc.pm
+++ b/IkiWiki/Plugin/toc.pm
@@ -4,14 +4,12 @@ package IkiWiki::Plugin::toc;
use warnings;
use strict;
-use IkiWiki;
+use IkiWiki 2.00;
use HTML::Parser;
sub import { #{{{
- IkiWiki::hook(type => "preprocess", id => "toc",
- call => \&preprocess);
- IkiWiki::hook(type => "format", id => "toc",
- call => \&format);
+ hook(type => "preprocess", id => "toc", call => \&preprocess);
+ hook(type => "format", id => "toc", call => \&format);
} # }}}
my %tocpages;
@@ -49,7 +47,7 @@ sub format (@) { #{{{
if ($tagname =~ /^h(\d+)$/i) {
my $level=$1;
my $anchor="index".++$anchors{$level}."h$level";
- $page.="$text";
+ $page.="$text";
# Take the first header level seen as the topmost level,
# even if there are higher levels seen later on.