]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/typography.pm
Improve error message when postsignin (probably from openid) fails due to
[ikiwiki.git] / IkiWiki / Plugin / typography.pm
index 6c5f06b0f3928aa7550a9c6fb32b92ef1891f73d..682dadab7bb7cddc7c960eb9beffcef05a43f5d6 100644 (file)
@@ -5,7 +5,6 @@ package IkiWiki::Plugin::typography;
 use warnings;
 use strict;
 use IkiWiki;
 use warnings;
 use strict;
 use IkiWiki;
-use Text::Typography;
 
 sub import { #{{{
        IkiWiki::hook(type => "sanitize", id => "typography", call => \&sanitize);
 
 sub import { #{{{
        IkiWiki::hook(type => "sanitize", id => "typography", call => \&sanitize);
@@ -14,6 +13,9 @@ sub import { #{{{
 sub sanitize (@) { #{{{
        my %params=@_;
 
 sub sanitize (@) { #{{{
        my %params=@_;
 
+       eval q{use Text::Typography};
+       return $params{content} if $@;
+
        return Text::Typography::typography($params{content});
 } # }}}
 
        return Text::Typography::typography($params{content});
 } # }}}