aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-03 22:08:04 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-03 22:08:04 +0000
commit6551c1e5609967c0c7f947fa0e9d85d24e454d37 (patch)
tree9cef8840dbfb06b90a42c49a30f0117e8e487a00 /IkiWiki.pm
parent7ea8df24b32a36687cfea94e2b84272777562325 (diff)
downloadikiwiki-6551c1e5609967c0c7f947fa0e9d85d24e454d37.tar
ikiwiki-6551c1e5609967c0c7f947fa0e9d85d24e454d37.tar.gz
* Support htmlize plugins and make mdwn one such plugin, which is enabled by
default (of course!). Based on a patch by Faidon Liambotis.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm12
1 files changed, 5 insertions, 7 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 7be1c7f58..39ceec04e 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -42,7 +42,7 @@ sub defaultconfig () { #{{{
setup => undef,
adminuser => undef,
adminemail => undef,
- plugin => [qw{inline htmlscrubber}],
+ plugin => [qw{mdwn inline htmlscrubber}],
timeformat => '%c',
} #}}}
@@ -123,12 +123,10 @@ sub dirname ($) { #{{{
sub pagetype ($) { #{{{
my $page=shift;
- if ($page =~ /\.mdwn$/) {
- return ".mdwn";
- }
- else {
- return "unknown";
+ if ($page =~ /\.(.*)$/) {
+ return $1 if exists $hooks{htmlize}{$1};
}
+ return "unknown";
} #}}}
sub pagename ($) { #{{{
@@ -136,7 +134,7 @@ sub pagename ($) { #{{{
my $type=pagetype($file);
my $page=$file;
- $page=~s/\Q$type\E*$// unless $type eq 'unknown';
+ $page=~s/\Q.$type\E*$// unless $type eq 'unknown';
return $page;
} #}}}