summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/wikitext.pm
blob: 9fa87dafb1c06902bdcc58e230f7c53f2325fe94 (plain)
  1. #!/usr/bin/perl
  2. # WikiText markup
  3. package IkiWiki::Plugin::wikitext;
  4. use warnings;
  5. use strict;
  6. use IkiWiki;
  7. use Text::WikiFormat;
  8. sub import { #{{{
  9. IkiWiki::hook(type => "htmlize", id => "wiki", call => \&htmlize);
  10. } # }}}
  11. sub htmlize ($) { #{{{
  12. my $content = shift;
  13. return Text::WikiFormat::format($content, undef, { implicit_links => 0 });
  14. } # }}}
  15. 1