[WM] Text::Textile and WebMake

webmake at technomage.net webmake at technomage.net
Thu Nov 20 19:19:01 GMT 2003


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) = @_;




More information about the Webmake-talk mailing list