response
[ikiwiki.git] / IkiWiki / Plugin / wikitext.pm
blobb24630b15bf9c380e2b68af44f59bcffaaf5bb70
1 #!/usr/bin/perl
2 # WikiText markup
3 package IkiWiki::Plugin::wikitext;
5 use warnings;
6 use strict;
7 use IkiWiki 3.00;
9 sub import {
10 hook(type => "getsetup", id => "wiki", call => \&getsetup);
11 hook(type => "htmlize", id => "wiki", call => \&htmlize);
14 sub getsetup () {
15 return
16 plugin => {
17 safe => 0, # format plugin
18 rebuild => undef,
19 section => "format",
24 sub htmlize (@) {
25 my %params=@_;
26 my $content = $params{content};
28 eval q{use Text::WikiFormat};
29 return $content if $@;
30 return Text::WikiFormat::format($content, undef, { implicit_links => 0 });