develooper Front page | perl.perl5.porters | Postings from July 2001

RESEND [PATCH] Pod::Html -- fixes extra gaps in raw text (fwd)

Thread Next
From:
Jeff 'japhy/Marillion' Pinyan
Date:
July 19, 2001 16:42
Subject:
RESEND [PATCH] Pod::Html -- fixes extra gaps in raw text (fwd)
Message ID:
Pine.GSO.4.21.0107191934300.7854-100000@crusoe.crusoe.net


-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter.         Brother #734
**      Manning Publications, Co, is publishing my Perl Regex book      **

---------- Forwarded message ----------
Date: Wed, 9 May 2001 14:36:25 -0400 (EDT)
From: Jeff Pinyan <jeffp@crusoe.net>
Reply-To: japhy@pobox.com
To: perl5-porters@perl.org
Cc: tchrist@perl.com
Subject: [PATCH] Pod::Html -- fixes extra gaps in raw text

Below sig.

The module was changing:

ABCDEF

  GHI
  
  JKL

MNOPQR

(please note that the line between GHI and JKL has two spaces on it.)

to:

<P>ABCDEF</P>
<PRE>
  GHI
</PRE>
<PRE>

  JKL</PRE>
<P>MNOPQR</P>

That causes an extra line in between the two PRE sections.

Now it changes it to:

<P>ABCDEF</P>
<PRE>
  GHI
  
  JKL</PRE>
<P>MNOPQR</P>

which is more appropriate (spaces are left intact, and no new PRE tag is
made.)

-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter.         Brother #734


*** /usr/local/lib/perl5/5.6.0/Pod/Html.pm.OLD  Wed May  9 14:24:12 2001
--- /usr/local/lib/perl5/5.6.0/Pod/Html.pm      Wed May  9 14:28:22 2001
***************
*** 306,312 ****
        ${$dataref}[$i] =~ s/\s+\Z//;

          # have a look for all-space lines
!       if( ${$dataref}[$i] =~ /^\s+$/m ){
            my @chunks = split( /^\s+$/m, ${$dataref}[$i] );
            splice( @$dataref, $i, 1, @chunks );
        }
--- 306,312 ----
        ${$dataref}[$i] =~ s/\s+\Z//;

          # have a look for all-space lines
!       if( ${$dataref}[$i] =~ /^\s+$/m and $dataref->[$i] !~ /^\s/ ){
            my @chunks = split( /^\s+$/m, ${$dataref}[$i] );
            splice( @$dataref, $i, 1, @chunks );
        }




Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About