summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/creole.pm
blob: 0c857d125bd1bc544c5a52a44f94a385cec13e08 (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. # don't parse WikiLinks, ikiwiki already does
  17. creole_customlinks();
  18. creole_custombarelinks();
  19. return creole_parse($content);
  20. } # }}}
  21. 1