projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
886890b
)
add websetup hook
author
Joey Hess
<joey@kitenet.net>
Tue, 21 Jun 2011 19:13:49 +0000
(15:13 -0400)
committer
Joey Hess
<joey@kitenet.net>
Tue, 21 Jun 2011 19:22:36 +0000
(15:22 -0400)
IkiWiki/Plugin/headinganchors.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/headinganchors.pm
b/IkiWiki/Plugin/headinganchors.pm
index 80b39ec05c7262c37c4a2113f1fa2c4b4aca5ca6..b291503682cebe12a7c81bfad5b8ac6f999268b9 100644
(file)
--- 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+//;