From b5a669f34b38da86b1260ac7a5abd7a63cfad4ac Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 21 Jun 2011 15:13:49 -0400 Subject: [PATCH] add websetup hook --- IkiWiki/Plugin/headinganchors.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/headinganchors.pm b/IkiWiki/Plugin/headinganchors.pm index 80b39ec05..b29150368 100644 --- a/IkiWiki/Plugin/headinganchors.pm +++ b/IkiWiki/Plugin/headinganchors.pm @@ -4,12 +4,22 @@ package IkiWiki::Plugin::headinganchors; use warnings; use strict; -use IkiWiki 2.00; +use IkiWiki 3.00; sub import { + hook(type => "getsetup", id => "headinganchors", call => \&getsetup); hook(type => "sanitize", id => "headinganchors", call => \&headinganchors); } +sub getsetup () { + return + plugin => { + safe => 1, + rebuild => undef, + section => "widget", + }, +} + sub text_to_anchor { my $str = shift; $str =~ s/^\s+//; -- 2.26.2