]> sipb.mit.edu Git - ikiwiki.git/blob - IkiWiki/Plugin/creole.pm
avoid internal error message when img uses just-deleted page
[ikiwiki.git] / IkiWiki / Plugin / creole.pm
1 #!/usr/bin/perl
2 # WikiCreole markup
3 # based on the WikiText plugin.
4 package IkiWiki::Plugin::creole;
5
6 use warnings;
7 use strict;
8 use IkiWiki 2.00;
9
10 sub import { #{{{
11         hook(type => "htmlize", id => "creole", call => \&htmlize);
12 } # }}}
13
14 sub htmlize (@) { #{{{
15         my %params=@_;
16         my $content = $params{content};
17
18         eval q{use Text::WikiCreole};
19         return $content if $@;
20
21         # don't parse WikiLinks, ikiwiki already does
22         creole_customlinks();
23         creole_custombarelinks();
24
25         return creole_parse($content);
26 } # }}}
27
28 1