X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/39195de96e6f705e4a5741254d6d01d14127005c..a7545978c76902076b42b774938e6f60b96aa396:/IkiWiki/Plugin/polygen.pm diff --git a/IkiWiki/Plugin/polygen.pm b/IkiWiki/Plugin/polygen.pm index fa564aa86..bc21d71c7 100644 --- a/IkiWiki/Plugin/polygen.pm +++ b/IkiWiki/Plugin/polygen.pm @@ -7,23 +7,23 @@ package IkiWiki::Plugin::polygen; use warnings; use strict; -use IkiWiki 2.00; +use IkiWiki 3.00; use File::Find; -sub import { #{{{ +sub import { hook(type => "getsetup", id => "polygen", call => \&getsetup); hook(type => "preprocess", id => "polygen", call => \&preprocess); -} # }}} +} -sub getsetup () { #{{{ +sub getsetup () { return plugin => { safe => 1, rebuild => undef, }, -} #}}} +} -sub preprocess (@) { #{{{ +sub preprocess (@) { my %params=@_; my $grammar = ($params{grammar} or 'polygen'); my $symbol = ($params{symbol} or undef); @@ -64,6 +64,6 @@ sub preprocess (@) { #{{{ # markdown text $res =~ s/\s*$//; return $res; -} # }}} +} 1