X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/3922ba15ba04d5519e77eae3cdc760e5853687d4..e4119f048c9ddd8795df378ff1ad676dca28de82:/IkiWiki/Plugin/edittemplate.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index aa72b0845..76c1cd42a 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm @@ -21,7 +21,8 @@ sub needsbuild (@) { #{{{ foreach my $page (keys %pagestate) { if (exists $pagestate{$page}{edittemplate}) { - if (grep { $_ eq $pagesources{$page} } @$needsbuild) { + if (exists $pagesources{$page} && + grep { $_ eq $pagesources{$page} } @$needsbuild) { # remove state, it will be re-added # if the preprocessor directive is still # there during the rebuild @@ -37,10 +38,10 @@ sub preprocess (@) { #{{{ return "" if $params{page} ne $params{destpage}; if (! exists $params{template} || ! length($params{template})) { - return return "[[meta ".gettext("template not specified")."]]"; + return "[[meta ".gettext("template not specified")."]]"; } if (! exists $params{match} || ! length($params{match})) { - return return "[[meta ".gettext("match not specified")."]]"; + return "[[meta ".gettext("match not specified")."]]"; } $pagestate{$params{page}}{edittemplate}{$params{match}}=$params{template};