From c7140ad90b0db2078e70b9cd3f08e1d176125191 Mon Sep 17 00:00:00 2001 From: joey Date: Thu, 21 Sep 2006 20:28:40 +0000 Subject: * Add typography (SmartyPants) plugin by Recai. --- IkiWiki/Plugin/typography.pm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 IkiWiki/Plugin/typography.pm (limited to 'IkiWiki/Plugin') diff --git a/IkiWiki/Plugin/typography.pm b/IkiWiki/Plugin/typography.pm new file mode 100644 index 000000000..d613f873b --- /dev/null +++ b/IkiWiki/Plugin/typography.pm @@ -0,0 +1,20 @@ +#!/usr/bin/perl + +package IkiWiki::Plugin::typography; + +use warnings; +use strict; +use IkiWiki; + +sub import { #{{{ + IkiWiki::hook(type => "sanitize", id => "typography", call => \&sanitize); +} # }}} + +sub sanitize (@) { #{{{ + my %params=@_; + + eval q{use Text::Typography}; + return Text::Typography::typography($params{content}); +} # }}} + +1 -- cgit v1.2.3