summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/typography.pm20
1 files changed, 20 insertions, 0 deletions
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