Skip Menu |

This queue is for tickets about the Perl-Tidy CPAN distribution.

Report information
The Basics
Id: 118553
Status: resolved
Priority: 0/
Queue: Perl-Tidy

People
Owner: Nobody in particular
Requestors: jidanni [...] jidanni.org
Cc:
AdminCc:

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



Subject: leave only one newline at the end of a file
Date: Sun, 30 Oct 2016 08:15:36 +0800
To: bug-Perl-Tidy [...] rt.cpan.org
From: Dan Jacobson <jidanni [...] jidanni.org>
I say perltidy should gobble all the extra trailing newlines found at the end of a file, except the last one.
Subject: Re: [rt.cpan.org #118553] leave only one newline at the end of a file
Date: Sun, 30 Oct 2016 05:59:41 -0700
To: "bug-Perl-Tidy [...] rt.cpan.org" <bug-Perl-Tidy [...] rt.cpan.org>
From: Steven Hancock <s7078hancock [...] gmail.com>
This is basically what it does, unless -mbl=n is changed. However, it does not touch anything after an __END__ or __DATA__, since they do not necessarily contain perl code. Steve On Sat, Oct 29, 2016 at 5:16 PM, Dan Jacobson via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> Sat Oct 29 20:15:58 2016: Request 118553 was acted upon. > Transaction: Ticket created by jidanni@jidanni.org > Queue: Perl-Tidy > Subject: leave only one newline at the end of a file > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: jidanni@jidanni.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=118553 > > > > I say perltidy should gobble all the extra trailing newlines found at the > end of > a file, except the last one. > >
Subject: Re: [rt.cpan.org #118553] leave only one newline at the end of a file
Date: Sun, 30 Oct 2016 21:25:40 +0800
To: "Steven Hancock via RT" <bug-Perl-Tidy [...] rt.cpan.org>
From: 積丹尼 Dan Jacobson <jidanni [...] jidanni.org>
{bla}\n\n\n\n\n becomes {bla}\n\n I say it should become {bla}\n as should {bla}\n\n too. The end of a file is special. It is not your normal }\n\n{ etc. case. Yes __DATA__ etc. is an exception.
This option was not added to the main program because of undesirable side effects, but 20190601 a has a filter script which can do this, "examples/delete_ending_blank_lines.pl".