summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/creole.pm
blob: f7f7a61e3dd369821c00200281016df557b69552 (plain)
  1. #!/usr/bin/perl
  2. # WikiCreole markup
  3. # based on the WikiText plugin.
  4. package IkiWiki::Plugin::creole;
  5. use warnings;
  6. use strict;
  7. use IkiWiki 2.00;
  8. sub import { #{{{
  9. hook(type => "htmlize", id => "creole", call => \&htmlize);
  10. } # }}}
  11. sub htmlize (@) { #{{{
  12. my %params=@_;
  13. my $content = $params{content};
  14. eval q{use Text::WikiCreole};
  15. return $content if $@;
  16. return Text::WikiCreole::creole_parse($content);
  17. } # }}}
  18. 1