summaryrefslogtreecommitdiff
path: root/lib/Pod
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-01-16 14:41:39 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-01-16 14:41:39 +0000
commit77003bb1f5b79e478d4e39dbf22a7d33aacd2fd5 (patch)
tree82f7154e7003b5f995bb87900a161fa891fc31a7 /lib/Pod
parent6a205a2b26c5f843ce3f68dbafd556015e6ebd7f (diff)
downloadperl-77003bb1f5b79e478d4e39dbf22a7d33aacd2fd5.tar.gz
podlators 1.07, from Russ Allbery.
p4raw-id: //depot/perl@8451
Diffstat (limited to 'lib/Pod')
-rw-r--r--lib/Pod/Man.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/Pod/Man.pm b/lib/Pod/Man.pm
index 84c8f6671b..2c61a9b233 100644
--- a/lib/Pod/Man.pm
+++ b/lib/Pod/Man.pm
@@ -1,7 +1,7 @@
# Pod::Man -- Convert POD data to formatted *roff input.
-# $Id: Man.pm,v 1.12 2000/12/25 12:56:12 eagle Exp $
+# $Id: Man.pm,v 1.14 2001/01/16 13:39:45 eagle Exp $
#
-# Copyright 1999, 2000 by Russ Allbery <rra@stanford.edu>
+# Copyright 1999, 2000, 2001 by Russ Allbery <rra@stanford.edu>
#
# This program is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -38,7 +38,7 @@ use vars qw(@ISA %ESCAPES $PREAMBLE $VERSION);
# Perl core and too many things could munge CVS magic revision strings.
# This number should ideally be the same as the CVS revision in podlators,
# however.
-$VERSION = 1.12;
+$VERSION = 1.14;
############################################################################
@@ -410,6 +410,10 @@ sub begin_pod {
}
}
+ # If $name contains spaces, quote it; this mostly comes up in the case
+ # of input from stdin.
+ $name = '"' . $name . '"' if ($name =~ /\s/);
+
# Modification date header. Try to use the modification time of our
# input.
if (!defined $$self{date}) {
@@ -630,6 +634,7 @@ sub cmd_head1 {
local $_ = $self->parse (@_);
s/\s+$//;
s/\\s-?\d//g;
+ s/\s*\n\s*/ /g;
if ($$self{ITEMS} > 1) {
$$self{ITEMS} = 0;
$self->output (".PD\n");
@@ -644,6 +649,7 @@ sub cmd_head2 {
my $self = shift;
local $_ = $self->parse (@_);
s/\s+$//;
+ s/\s*\n\s*/ /g;
if ($$self{ITEMS} > 1) {
$$self{ITEMS} = 0;
$self->output (".PD\n");
@@ -658,6 +664,7 @@ sub cmd_head3 {
my $self = shift;
local $_ = $self->parse (@_);
s/\s+$//;
+ s/\s*\n\s*/ /g;
if ($$self{ITEMS} > 1) {
$$self{ITEMS} = 0;
$self->output (".PD\n");
@@ -673,6 +680,7 @@ sub cmd_head4 {
my $self = shift;
local $_ = $self->parse (@_);
s/\s+$//;
+ s/\s*\n\s*/ /g;
if ($$self{ITEMS} > 1) {
$$self{ITEMS} = 0;
$self->output (".PD\n");