This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pod2html again
authorIlya Zakharevich <ilya@math.berkeley.edu>
Fri, 13 Mar 1998 20:03:52 +0000 (15:03 -0500)
committerGurusamy Sarathy <gsar@cpan.org>
Wed, 10 Jun 1998 07:00:08 +0000 (07:00 +0000)
Message-Id: <199803140103.UAA04839@monk.mps.ohio-state.edu>

p4raw-id: //depot/perl@1102

lib/Pod/Html.pm

index dafa27d..a0dc4b3 100644 (file)
@@ -1010,13 +1010,19 @@ sub process_pod {
 
 #
 # process_for - process a =for pod tag.  if it's for html, split
-# it out verbatim, otherwise ignore it.
+# it out verbatim, if illustration, center it, otherwise ignore it.
 #
 sub process_for {
     my($whom, $text) = @_;
     if ( $whom =~ /^(pod2)?html$/i) {
        print HTML $text;
-    } 
+    } elsif ($whom =~ /^illustration$/i) {
+        1 while chomp $text;
+       for my $ext (qw[.png .gif .jpeg .jpg .tga .pcl .bmp]) {
+         $text .= $ext, last if -r "$text$ext";
+       }
+        print HTML qq{<p align = "center"><img src = "$text" alt = "$text illustration"></p>};
+    }
 }
 
 #