diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-05-16 10:37:15 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-05-16 10:37:15 -0400 |
commit | 251fe8dae6e0bdf5a3d3ad4fc413b2163fecbb75 (patch) | |
tree | 92c9ad76784ea2bfd03c23e257ad4667c655c377 | |
parent | d96bedef6b65d61f05c2e204292f67b68279e7b3 (diff) | |
parent | eba9b862b2f7d346dfffcd5576cd96fce9dd239d (diff) |
Merge commit 'remotes/jmtd/friendly_markup_names'
-rw-r--r-- | IkiWiki/Plugin/editpage.pm | 5 | ||||
-rw-r--r-- | IkiWiki/Plugin/mdwn.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/textile.pm | 2 | ||||
-rw-r--r-- | doc/plugins/write.mdwn | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 0068a6b11..af42097ba 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -276,8 +276,9 @@ sub cgi_editpage ($$) { my @page_types; if (exists $hooks{htmlize}) { - @page_types=grep { !/^_/ } - keys %{$hooks{htmlize}}; + foreach my $key (grep { !/^_/ } keys %{$hooks{htmlize}}) { + push @page_types, [$key, $hooks{htmlize}{$key}{longname} || $key]; + } } $form->tmpl_param("page_select", 1); diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm index 0e134c822..c62780cb8 100644 --- a/IkiWiki/Plugin/mdwn.pm +++ b/IkiWiki/Plugin/mdwn.pm @@ -8,7 +8,7 @@ use IkiWiki 3.00; sub import { hook(type => "getsetup", id => "mdwn", call => \&getsetup); - hook(type => "htmlize", id => "mdwn", call => \&htmlize); + hook(type => "htmlize", id => "mdwn", call => \&htmlize, longname => "Markdown"); } sub getsetup () { diff --git a/IkiWiki/Plugin/textile.pm b/IkiWiki/Plugin/textile.pm index b604aa3c5..8cc5a7951 100644 --- a/IkiWiki/Plugin/textile.pm +++ b/IkiWiki/Plugin/textile.pm @@ -11,7 +11,7 @@ use Encode; sub import { hook(type => "getsetup", id => "textile", call => \&getsetup); - hook(type => "htmlize", id => "txtl", call => \&htmlize); + hook(type => "htmlize", id => "txtl", call => \&htmlize, longname => "Textile"); } sub getsetup () { diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 28da243d5..d0f6a09e1 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -198,6 +198,9 @@ value, then the id parameter specifies not a filename extension, but a whole filename that can be htmlized. This is useful for files like `Makefile` that have no extension. +If `hook` is passed an optional "longname" parameter, this value is used +when prompting a user to choose a page type on the edit page form. + ### pagetemplate hook(type => "pagetemplate", id => "foo", call => \&pagetemplate); |