]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - IkiWiki/Plugin/textile.pm
web commit by JoshTriplett: asprintf and glibc
[git.ikiwiki.info.git] / IkiWiki / Plugin / textile.pm
1 #!/usr/bin/perl
2 # By mazirian; GPL license
3 # Textile markup
5 package IkiWiki::Plugin::textile;
7 use warnings;
8 use strict;
9 use IkiWiki 2.00;
11 sub import { #{{{
12         hook(type => "htmlize", id => "txtl", call => \&htmlize);
13 } # }}}
15 sub htmlize (@) { #{{{
16         my %params=@_;
17         my $content = $params{content};
19         eval q{use Text::Textile};
20         return $content if $@;
21         return Text::Textile::textile($content);
22 } # }}}
24 1