use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getopt", id => "typography", call => \&getopt);
IkiWiki::hook(type => "sanitize", id => "typography", call => \&sanitize);
} # }}}
+sub getopt () { #{{{
+ eval q{use Getopt::Long};
+ error($@) if $@;
+ Getopt::Long::Configure('pass_through');
+ GetOptions("typographyattributes=s" => \$config{typographyattributes});
+} #}}}
+
sub sanitize (@) { #{{{
my %params=@_;
eval q{use Text::Typography};
return $params{content} if $@;
- return Text::Typography::typography($params{content});
+ my $attributes=defined $config{typographyattributes} ? $config{typographyattributes} : '3';
+ return Text::Typography::typography($params{content}, $attributes);
} # }}}
1
* Fix wrapper generator and untaint code's handling of strings contining
newlines.
* Make the url absolution code for feeds significantly more robust.
+ * Add typographyattributes configuration setting to typography plugin.
- -- Joey Hess <joeyh@debian.org> Sun, 03 Jun 2007 13:10:08 -0400
+ -- Joey Hess <joeyh@debian.org> Tue, 05 Jun 2007 15:03:48 -0400
ikiwiki (2.1) unstable; urgency=low
plain ASCII punctuation characters into ``smart'' typographic punctuation HTML
entities. To use it, you need to have the [[cpan Text::Typography]] module
installed.
+
+This plugin has a configuration option. To change the attributes,
+set `--typographyattributes=whatever`. See the documentation for
+[[cpan Text::Typography]] for available attributes.
which translations to make. [[cpan Text::Typography]] supports fine-grained
control of which translations to make, so [[plugins/typography]] just needs to
expose this somehow. --[[JoshTriplett]]
+
+[[done]] --[[Joey]]