summaryrefslogtreecommitdiff
path: root/lib/Pod
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-03-13 15:03:52 -0500
committerGurusamy Sarathy <gsar@cpan.org>1998-06-10 07:00:08 +0000
commitc4d9b39d8f15049e1549fda7afe0c7c2d758d308 (patch)
tree154b4d4891abb31510ff01e85d7ee39fa6d6c2ec /lib/Pod
parent5f4b28b29039444aa4497be41d052e0fe0128ede (diff)
downloadperl-c4d9b39d8f15049e1549fda7afe0c7c2d758d308.tar.gz
pod2html again
Message-Id: <199803140103.UAA04839@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@1102
Diffstat (limited to 'lib/Pod')
-rw-r--r--lib/Pod/Html.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm
index dafa27d781..a0dc4b3f11 100644
--- a/lib/Pod/Html.pm
+++ b/lib/Pod/Html.pm
@@ -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>};
+ }
}
#