diff options
author | http://www.cse.unsw.edu.au/~willu/ <http://www.cse.unsw.edu.au/~willu/@web> | 2009-02-13 06:16:18 -0500 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2009-02-13 06:16:18 -0500 |
commit | 7599de6e436fd141a8027ad65d5a2b0b03ea6f98 (patch) | |
tree | a311073d0cbc0bf5dfeede534bde393979b529cc /doc/todo | |
parent | 257cbbcb7e151053641bde409253a1ea792e9569 (diff) |
Add a new bug to track simple patch
Diffstat (limited to 'doc/todo')
-rw-r--r-- | doc/todo/Allow_filenames_that_are_all_type.mdwn | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/todo/Allow_filenames_that_are_all_type.mdwn b/doc/todo/Allow_filenames_that_are_all_type.mdwn new file mode 100644 index 000000000..55e29b645 --- /dev/null +++ b/doc/todo/Allow_filenames_that_are_all_type.mdwn @@ -0,0 +1,20 @@ +This is a [[patch]] to allow filenames that are just the type. The best example of this is wanting to +pass a `Makefile` through one of the [[todo/syntax_highlighting/]] plugins. With this patch, +if the plugin can process files of type `.Makefile` then it will also process `Makefile`. + +I put this patch on the [[todo/syntax_highlighting/]] page a while ago, but it seemed to get +lost because it didn't have its own bug to track it. Now it does :). -- [[Will]] + + diff --git a/IkiWiki.pm b/IkiWiki.pm + index 8d728c9..1bd46a9 100644 + --- a/IkiWiki.pm + +++ b/IkiWiki.pm + @@ -618,6 +618,8 @@ sub pagetype ($) { + + if ($page =~ /\.([^.]+)$/) { + return $1 if exists $hooks{htmlize}{$1}; + + } elsif ($hooks{htmlize}{$page}{keepextension}) { + + return $page; + } + return; + } |