summaryrefslogtreecommitdiff
path: root/lib/Pod
diff options
context:
space:
mode:
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>};
+ }
}
#