summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/typography.pm
blob: 682dadab7bb7cddc7c960eb9beffcef05a43f5d6 (plain)
  1. #!/usr/bin/perl
  2. package IkiWiki::Plugin::typography;
  3. use warnings;
  4. use strict;
  5. use IkiWiki;
  6. sub import { #{{{
  7. IkiWiki::hook(type => "sanitize", id => "typography", call => \&sanitize);
  8. } # }}}
  9. sub sanitize (@) { #{{{
  10. my %params=@_;
  11. eval q{use Text::Typography};
  12. return $params{content} if $@;
  13. return Text::Typography::typography($params{content});
  14. } # }}}
  15. 1