X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f92505d78b82c6ac146e43054ebd12441575a602..426200b34aef45e3987edf79bc157209f435fb8b:/IkiWiki/Plugin/edittemplate.pm diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index b7651ce02..d1716a315 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm @@ -38,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")."]]"; + error gettext("template not specified") } if (! exists $params{match} || ! length($params{match})) { - return return "[[meta ".gettext("match not specified")."]]"; + error gettext("match not specified") } $pagestate{$params{page}}{edittemplate}{$params{match}}=$params{template}; @@ -108,7 +108,9 @@ sub filltemplate ($$) { #{{{ ); }; if ($@) { - return "[[pagetemplate ".gettext("failed to process")." $@]]"; + # Indicate that the earlier preprocessor directive set + # up a template that doesn't work. + return "[[!pagetemplate ".gettext("failed to process")." $@]]"; } $template->param(name => $page);