Skip Menu |

This queue is for tickets about the podlators CPAN distribution.

Report information
The Basics
Id: 61781
Status: resolved
Priority: 0/
Queue: podlators

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.3.1
Fixed in: 2.4.0



Subject: roff output for S< > space at end of paragraph
Date: Thu, 30 Sep 2010 09:48:17 +1000
To: bug-podlators [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
In Pod::Man 2.23 of podlators 2.3.1 and recent debian perl 5.10.1, if a paragraph ends with an S< > non-breaking space then the roff output has a backslashed newline causing the following directive to appear literally. For example foo.pod below gives hello\ .PP world which groff formats as hello.PP world I'm not sure if a non-breaking space at the end should be preserved, or trimmed like other trailing space. The change below works for me to keep it.
--- Man.pm.orig 2010-09-30 09:39:02.000000000 +1000 +++ Man.pm 2010-09-30 09:39:41.000000000 +1000 @@ -949,8 +949,9 @@ if defined ($line) && DEBUG && !$$self{IN_NAME}; # Force exactly one newline at the end and strip unwanted trailing - # whitespace at the end. - $text =~ s/\s*$/\n/; + # whitespace at the end, but leave "\ " backslashed space from an S< > + # at the end of a line. + $text =~ s/(?<!\\)\s*$/\n/; # Output the paragraph. $self->output ($self->protect ($self->textmapfonts ($text)));
Subject: Re: [rt.cpan.org #61781] roff output for S< > space at end of paragraph
Date: Thu, 30 Sep 2010 16:01:52 -0700
To: bug-podlators [...] rt.cpan.org
From: Russ Allbery <rra [...] stanford.edu>
"Kevin Ryde via RT" <bug-podlators@rt.cpan.org> writes: Show quoted text
> In Pod::Man 2.23 of podlators 2.3.1 and recent debian perl 5.10.1, if a > paragraph ends with an S< > non-breaking space then the roff output has > a backslashed newline causing the following directive to appear > literally.
Show quoted text
> For example foo.pod below gives
Show quoted text
> hello\ > .PP > world
Show quoted text
> which groff formats as
Show quoted text
> hello.PP world
Show quoted text
> I'm not sure if a non-breaking space at the end should be preserved, or > trimmed like other trailing space. The change below works for me to > keep it.
Good catch. This change looks reasonable to me. I'll incorporate it into the next release. Show quoted text
> --- Man.pm.orig 2010-09-30 09:39:02.000000000 +1000 > +++ Man.pm 2010-09-30 09:39:41.000000000 +1000 > @@ -949,8 +949,9 @@ > if defined ($line) && DEBUG && !$$self{IN_NAME}; > > # Force exactly one newline at the end and strip unwanted trailing > - # whitespace at the end. > - $text =~ s/\s*$/\n/; > + # whitespace at the end, but leave "\ " backslashed space from an S< > > + # at the end of a line. > + $text =~ s/(?<!\\)\s*$/\n/; > > # Output the paragraph. > $self->output ($self->protect ($self->textmapfonts ($text)));
-- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
This was fixed in podlators 2.4.0 some time ago.