aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>2016-03-08 14:31:15 -0500
committerAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>2016-03-08 14:31:15 -0500
commit63fa0ef5ba9a2e367791dd19b9aeb7c98d70ac85 (patch)
tree04fdbcb51708baa322b7776afc74e70804aa7933
parentcc0e6b77f08de8e8c8770536a381325125437f8b (diff)
downloadikiwiki-63fa0ef5ba9a2e367791dd19b9aeb7c98d70ac85.tar
ikiwiki-63fa0ef5ba9a2e367791dd19b9aeb7c98d70ac85.tar.gz
Process .md like .mdwn, but disallow web creation.
-rw-r--r--IkiWiki/Plugin/comments.pm3
-rw-r--r--IkiWiki/Plugin/editpage.pm3
-rw-r--r--IkiWiki/Plugin/mdwn.pm1
-rw-r--r--IkiWiki/Plugin/rename.pm3
4 files changed, 7 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index e93db94eb..b47f965e7 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -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;
diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm
index 78d0704c7..6ca4b589f 100644
--- a/IkiWiki/Plugin/editpage.pm
+++ b/IkiWiki/Plugin/editpage.pm
@@ -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;
diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm
index 014e78eea..daf9d592e 100644
--- a/IkiWiki/Plugin/mdwn.pm
+++ b/IkiWiki/Plugin/mdwn.pm
@@ -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 () {
diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm
index 6d56340b8..4a86d5a09 100644
--- a/IkiWiki/Plugin/rename.pm
+++ b/IkiWiki/Plugin/rename.pm
@@ -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;