diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-03-15 17:39:14 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-03-15 17:39:14 -0400 |
commit | c176dcde982dfa3095cf7c2d05db4cb71c1713e5 (patch) | |
tree | 75c18219f9f409f75c5cf9dc4f0f7a4032ca3885 /IkiWiki.pm | |
parent | e95cee757a67c55eb15a1d4a3a323a4052a7c30b (diff) | |
download | ikiwiki-c176dcde982dfa3095cf7c2d05db4cb71c1713e5.tar ikiwiki-c176dcde982dfa3095cf7c2d05db4cb71c1713e5.tar.gz |
Fix bug that caused weird things to appear as page types.
The problem was introduced by the recent noextension patches.
Object autovivification caused junk to get into %htmlize,
and all keys of that showed up as page types.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index a876bbb44..ee07258ec 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -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; } |