]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/comments.pm
support longname for page types in commands and rename
[git.ikiwiki.info.git] / IkiWiki / Plugin / comments.pm
index e618d1a90ade4f1a1286e856e1b7ea65cd1fc981..0aa4759d807c3060eed580d58f862c6d22ab9d70 100644 (file)
@@ -287,10 +287,15 @@ sub editcomment ($$) {
        else {
                $type = $config{default_pageext};
        }
+
+
        my @page_types;
        if (exists $IkiWiki::hooks{htmlize}) {
-               @page_types = grep { ! /^_/ } keys %{$IkiWiki::hooks{htmlize}};
+               foreach my $key (grep { !/^_/ } keys %{$IkiWiki::hooks{htmlize}}) {
+                       push @page_types, [$key, $IkiWiki::hooks{htmlize}{$key}{longname} || $key];
+               }
        }
+       @page_types=sort @page_types;
 
        $form->field(name => 'do', type => 'hidden');
        $form->field(name => 'sid', type => 'hidden', value => $session->id,