Skip Menu |

This queue is for tickets about the Text-Autoformat CPAN distribution.

Report information
The Basics
Id: 4407
Status: new
Priority: 0/
Queue: Text-Autoformat

People
Owner: Nobody in particular
Requestors: autoformat17nov [...] chirayu.fastmail.fm
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.12
Fixed in: (no value)



Subject: Autoformat does not work with : at the end
Hello, In a block of text if the last character of the block is a full colon: (at the end of the last word in the block only) Followed by at least one empty line. The lines of text before it (in the same block) will not be wrapped to 72 characters. regards, Chirayu
Date: Tue, 18 Nov 2003 06:23:26 +1100
From: Damian Conway <damian [...] conway.org>
To: bug-Text-Autoformat [...] rt.cpan.org
CC: AdminCc [...] fsck.com, of [...] fsck.com, cpan [...] fsck.com, Ticket [...] fsck.com, #4407: , ;
Subject: Re: [cpan #4407] Autoformat does not work with : at the end
RT-Send-Cc:
Hi Chirayu, You reported: Show quoted text
> In a block of text if the last character of the block is a full colon: > (at the end of the last word in the block only) Followed by at least > one empty line. The lines of text before it (in the same block) will > not be wrapped to 72 characters.
I think I must be misunderstanding your report. The following test code works fine for me (using Text::Autoformat 1.12): use Text::Autoformat; print "Autoformat $Text::Autoformat::VERSION\n\n"; print autoformat <<EOT; This is a block of text with a colon at the very end and Chirayu claims it doesn't wrap correctly: This is supposed to test that. EOT If this is not the situation you meant could you send me a variation on it that illustrates the problem you're reporting? Thanks, Damian
From: struan [...] exo.org.uk
[damian@conway.org - Mon Nov 17 14:23:37 2003]: Show quoted text
> I think I must be misunderstanding your report. The following test > code works fine for me (using Text::Autoformat 1.12): > > use Text::Autoformat; > > print "Autoformat $Text::Autoformat::VERSION\n\n"; > > print autoformat <<EOT; > This is a block of text with a colon at the > very end and Chirayu claims it doesn't > wrap correctly: > > This is supposed to test that. > EOT > > If this is not the situation you meant could you send me a variation > on it that illustrates the problem you're reporting?
Hi, This variation does not work. use Text::Autoformat; print "Autoformat $Text::Autoformat::VERSION\n\n"; my $text = <<EOT; This is a block of text with a colon at the very end and Chirayu claims it doesn't wrap correctly: This is supposed to test that. EOT print autoformat $text, { left => 4, all => 1 }; Without the all => 1 the first block is fine, but when set the first block is not indented. The second block is treated as expected Thanks Struan
From: struan [...] exo.org.uk
Actually, a colon in the text in general seems to have unpredictable effects. From what I can tell from poking about it's an effect of the ignore_headers functionality. As such it only applies to lines that aren't indented and have a colon in them. Hence a quick work around is to pass something like ignore => qr/^$/ as an argment. Perhaps some sort of note in the docs to this effect would be handy. Cheers Struan
Date: Tue, 27 Jan 2004 17:33:30 +1100
From: Damian Conway <damian [...] conway.org>
To: bug-Text-Autoformat [...] rt.cpan.org
Subject: Re: [cpan #4407] Autoformat does not work with : at the end
RT-Send-Cc:
Show quoted text
> Actually, a colon in the text in general seems to have unpredictable > effects. From what I can tell from poking about it's an effect of the > ignore_headers functionality. As such it only applies to lines that > aren't indented and have a colon in them. > > Hence a quick work around is to pass something like ignore => qr/^$/ as > an argment. Perhaps some sort of note in the docs to this effect would > be handy.
I've turned off the default mail-header-ignorance in the next release. Instead there's now a C<< mail=>1 >> option that turns it on specifically. Thanks again for the useful feedback. Damian