X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/2c05a34be17c805d929f0ad563acf857eba1d46b..14a9e704c1f11510fe8b16e161de69646e869bd0:/IkiWiki/Plugin/polygen.pm diff --git a/IkiWiki/Plugin/polygen.pm b/IkiWiki/Plugin/polygen.pm index 70378cf1b..a32003778 100644 --- a/IkiWiki/Plugin/polygen.pm +++ b/IkiWiki/Plugin/polygen.pm @@ -10,11 +10,20 @@ use strict; use IkiWiki 2.00; use File::Find; -sub import { #{{{ +sub import { + hook(type => "getsetup", id => "polygen", call => \&getsetup); hook(type => "preprocess", id => "polygen", call => \&preprocess); -} # }}} +} -sub preprocess (@) { #{{{ +sub getsetup () { + return + plugin => { + safe => 1, + rebuild => undef, + }, +} + +sub preprocess (@) { my %params=@_; my $grammar = ($params{grammar} or 'polygen'); my $symbol = ($params{symbol} or undef); @@ -55,6 +64,6 @@ sub preprocess (@) { #{{{ # markdown text $res =~ s/\s*$//; return $res; -} # }}} +} 1