]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - IkiWiki/Plugin/wikitext.pm
inline: Support feedfile option to change the filename of the feed generated.
[git.ikiwiki.info.git] / IkiWiki / Plugin / wikitext.pm
1 #!/usr/bin/perl
2 # WikiText markup
3 package IkiWiki::Plugin::wikitext;
5 use warnings;
6 use strict;
7 use IkiWiki 2.00;
9 sub import { #{{{
10         hook(type => "getsetup", id => "wiki", call => \&getsetup);
11         hook(type => "htmlize", id => "wiki", call => \&htmlize);
12 } # }}}
14 sub getsetup () { #{{{
15         return
16                 plugin => {
17                         safe => 0, # format plugin
18                         rebuild => undef,
19                 },
20 } #}}}
23 sub htmlize (@) { #{{{
24         my %params=@_;
25         my $content = $params{content};
27         eval q{use Text::WikiFormat};
28         return $content if $@;
29         return Text::WikiFormat::format($content, undef, { implicit_links => 0 });
30 } # }}}
32 1