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};
31 typographyattributes => {
34 description => "Text::Typography attributes value",
41 sub sanitize (@) { #{{{
44 eval q{use Text::Typography};
45 return $params{content} if $@;
47 my $attributes=defined $config{typographyattributes} ? $config{typographyattributes} : '3';
48 return Text::Typography::typography($params{content}, $attributes);