Process .md like .mdwn, but disallow web creation.
parent
cc0e6b77f0
commit
63fa0ef5ba
|
@ -356,7 +356,8 @@ sub editcomment ($$) {
|
|||
my @page_types;
|
||||
if (exists $IkiWiki::hooks{htmlize}) {
|
||||
foreach my $key (grep { !/^_/ && isallowed($_) } keys %{$IkiWiki::hooks{htmlize}}) {
|
||||
push @page_types, [$key, $IkiWiki::hooks{htmlize}{$key}{longname} || $key];
|
||||
push @page_types, [$key, $IkiWiki::hooks{htmlize}{$key}{longname} || $key]
|
||||
unless $IkiWiki::hooks{htmlize}{$key}{nocreate};
|
||||
}
|
||||
}
|
||||
@page_types=sort @page_types;
|
||||
|
|
|
@ -305,7 +305,8 @@ sub cgi_editpage ($$) {
|
|||
my @page_types;
|
||||
if (exists $hooks{htmlize}) {
|
||||
foreach my $key (grep { !/^_/ } keys %{$hooks{htmlize}}) {
|
||||
push @page_types, [$key, $hooks{htmlize}{$key}{longname} || $key];
|
||||
push @page_types, [$key, $hooks{htmlize}{$key}{longname} || $key]
|
||||
unless $hooks{htmlize}{$key}{nocreate};
|
||||
}
|
||||
}
|
||||
@page_types=sort @page_types;
|
||||
|
|
|
@ -9,6 +9,7 @@ use IkiWiki 3.00;
|
|||
sub import {
|
||||
hook(type => "getsetup", id => "mdwn", call => \&getsetup);
|
||||
hook(type => "htmlize", id => "mdwn", call => \&htmlize, longname => "Markdown");
|
||||
hook(type => "htmlize", id => "md", call => \&htmlize, longname => "Markdown (popular file extension)", nocreate => 1);
|
||||
}
|
||||
|
||||
sub getsetup () {
|
||||
|
|
|
@ -141,7 +141,8 @@ sub rename_form ($$$) {
|
|||
my @page_types;
|
||||
if (exists $IkiWiki::hooks{htmlize}) {
|
||||
foreach my $key (grep { !/^_/ } keys %{$IkiWiki::hooks{htmlize}}) {
|
||||
push @page_types, [$key, $IkiWiki::hooks{htmlize}{$key}{longname} || $key];
|
||||
push @page_types, [$key, $IkiWiki::hooks{htmlize}{$key}{longname} || $key]
|
||||
unless $IkiWiki::hooks{htmlize}{$key}{nocreate};
|
||||
}
|
||||
}
|
||||
@page_types=sort @page_types;
|
||||
|
|
Loading…
Reference in New Issue