]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/Allow_filenames_that_are_all_type.mdwn
escaped comma in page title
[ikiwiki.git] / doc / todo / Allow_filenames_that_are_all_type.mdwn
1 This is a [[patch]] to allow filenames that are just the type.  The best example of this is wanting to
2 pass a `Makefile` through one of the [[todo/syntax_highlighting/]] plugins.  With this patch,
3 if the plugin can process files of type `.Makefile` then it will also process `Makefile`.
4
5 I put this patch on the [[todo/syntax_highlighting/]] page a while ago, but it seemed to get
6 lost because it didn't have its own bug to track it.  Now it does :).  -- [[Will]]
7
8     diff --git a/IkiWiki.pm b/IkiWiki.pm
9     index 8d728c9..1bd46a9 100644
10     --- a/IkiWiki.pm
11     +++ b/IkiWiki.pm
12     @@ -618,6 +618,8 @@ sub pagetype ($) {
13         
14         if ($page =~ /\.([^.]+)$/) {
15                 return $1 if exists $hooks{htmlize}{$1};
16     +   } elsif ($hooks{htmlize}{$page}{keepextension}) {
17     +           return $page;
18         }
19         return;
20      }