X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/66dc253437e7ce2e3e8984513b3ecf96603d6670..ccf422e9904110f564f75ae6dac7813d2fbebeea:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index f580d1f0d..ee07258ec 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -533,7 +533,7 @@ sub loadplugins () { run_hooks(getopt => sub { shift->() }); if (grep /^-/, @ARGV) { - print STDERR "Unknown option: $_\n" + print STDERR "Unknown option (or missing parameter): $_\n" foreach grep /^-/, @ARGV; usage(); } @@ -639,8 +639,10 @@ sub pagetype ($) { if ($file =~ /\.([^.]+)$/) { return $1 if exists $hooks{htmlize}{$1}; } - elsif ($hooks{htmlize}{basename($file)}{noextension}) { - return basename($file); + my $base=basename($file); + if (exists $hooks{htmlize}{$base} && + $hooks{htmlize}{$base}{noextension}) { + return $base; } return; }