3 package IkiWiki::Plugin::typography;
10 hook(type => "getopt", id => "typography", call => \&getopt);
11 hook(type => "getsetup", id => "typography", call => \&getsetup);
12 IkiWiki::hook(type => "sanitize", id => "typography", call => \&sanitize);
16 eval q{use Getopt::Long};
18 Getopt::Long::Configure('pass_through');
19 GetOptions("typographyattributes=s" => \$config{typographyattributes});
22 sub getsetup () { #{{{
23 eval q{use Text::Typography};
27 typographyattributes => {
31 description => "Text::Typography attributes value",
37 sub sanitize (@) { #{{{
40 eval q{use Text::Typography};
41 return $params{content} if $@;
43 my $attributes=defined $config{typographyattributes} ? $config{typographyattributes} : '3';
44 return Text::Typography::typography($params{content}, $attributes);