aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/toc.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-06-28 23:08:24 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-06-28 23:08:24 -0400
commitb66f9a1981094bc2159a228dfaefc5c2e01ee68a (patch)
tree47264880d8667dc2411b7392b6c6da3f4ac1a0f1 /IkiWiki/Plugin/toc.pm
parentf8fe1247bdc13533673f217e6c77361a1188d7eb (diff)
downloadikiwiki-b66f9a1981094bc2159a228dfaefc5c2e01ee68a.tar
ikiwiki-b66f9a1981094bc2159a228dfaefc5c2e01ee68a.tar.gz
call format hooks when generating page previews
* toc: Revert change in 2.45 that made it run at sanitize time. This breaks use of toc in a sidebar. * Call format hooks when generating page previews, thus fixing toc display there, as well as fixing inlins to again display in page previews, since it's started using format hooks. This also allows several other things, like embed, that use format hooks, to work during page preview time. * Format hooks should not rely on getting an entire html document, as they will only get the body during page preview. * toggle: Deal with preview mode when adding javascript.
Diffstat (limited to 'IkiWiki/Plugin/toc.pm')
-rw-r--r--IkiWiki/Plugin/toc.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/toc.pm b/IkiWiki/Plugin/toc.pm
index 5380dd965..639cae4a9 100644
--- a/IkiWiki/Plugin/toc.pm
+++ b/IkiWiki/Plugin/toc.pm
@@ -9,7 +9,7 @@ use HTML::Parser;
sub import { #{{{
hook(type => "preprocess", id => "toc", call => \&preprocess);
- hook(type => "sanitize", id => "toc", call => \&sanitize);
+ hook(type => "format", id => "toc", call => \&format);
} # }}}
my %tocpages;
@@ -33,7 +33,7 @@ sub preprocess (@) { #{{{
}
} # }}}
-sub sanitize (@) { #{{{
+sub format (@) { #{{{
my %params=@_;
my $content=$params{content};