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 => {
30 description => "Text::Typography attributes value",
36 sub sanitize (@) { #{{{
39 eval q{use Text::Typography};
40 return $params{content} if $@;
42 my $attributes=defined $config{typographyattributes} ? $config{typographyattributes} : '3';
43 return Text::Typography::typography($params{content}, $attributes);