[WM] Text::Textile and WebMake
Matt Okeson-Harlow
webmake at technomage.net
Thu Nov 20 19:35:01 GMT 2003
oops, forgot to include some form of explanation
this is a diff showing what i changed to add Text::Textile support for webmake
seems to be working for me...
On Thu, Nov 20, 2003 at 01:17:42PM -0600, webmake at technomage.net wrote:
> diff -u FormatConvert.pm /usr/local/share/perl/5.8.0/HTML/WebMake/FormatConvert.pm
> --- FormatConvert.pm 2001-11-26 01:01:38.000000000 -0600
> +++ /usr/local/share/perl/5.8.0/HTML/WebMake/FormatConvert.pm 2003-11-19 10:31:51.000000000 -0600
> @@ -22,6 +22,9 @@
>
> sub set_converters {
> my $self = shift;
> +
> + $self->add_converter ('text/tt', 'text/html',
> + 'Text::Textile', \&tt_to_html);
>
> $self->add_converter ('text/et', 'text/html',
> 'Text::EtText::EtText2HTML', \&et_to_html);
> @@ -191,6 +194,20 @@
> }
>
> # -------------------------------------------------------------------------
> +# textile stuff
> +
> +sub tt_to_html
> +{
> + my ($self,$contobj,$txt) = @_;
> + require Text::Textile;
> +
> + my $textile = new Text::Textile;
> + $self = $textile->process($txt);
> + return $self;
> +}
> +
> +
> +# -------------------------------------------------------------------------
>
> sub pod_to_html {
> my ($self, $contobj, $txt) = @_;
>
> _______________________________________________
> Webmake-talk mailing list
> Webmake-talk at taint.org
> http://webmake.taint.org/mailman/listinfo/webmake-talk
--
matt okeson-harlow
mharlow at grephead dot com
More information about the Webmake-talk
mailing list