summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-06-19 19:11:03 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-06-19 19:11:18 -0400
commit98095ccac43b4b82d95bd8fd0ce3c8c16a325b22 (patch)
treeaa1e5c9634e3172c28f5173f07cf29f6c5fb9e57 /IkiWiki
parent3a204fabbb4a7324bf7bdda1ffd5886e0da70c71 (diff)
creole: New plugin from Bernd Zeimetz. Closes: #486930
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/creole.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/creole.pm b/IkiWiki/Plugin/creole.pm
new file mode 100644
index 000000000..f7f7a61e3
--- /dev/null
+++ b/IkiWiki/Plugin/creole.pm
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+# WikiCreole markup
+# based on the WikiText plugin.
+package IkiWiki::Plugin::creole;
+
+use warnings;
+use strict;
+use IkiWiki 2.00;
+
+sub import { #{{{
+ hook(type => "htmlize", id => "creole", call => \&htmlize);
+} # }}}
+
+sub htmlize (@) { #{{{
+ my %params=@_;
+ my $content = $params{content};
+
+ eval q{use Text::WikiCreole};
+ return $content if $@;
+ return Text::WikiCreole::creole_parse($content);
+} # }}}
+
+1