FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=12271&edit=1

ID: 12271
Comment by: harty83
Reported By: harty83 at gmail dot com
Summary: Don't strip all blank lines
Status: Open
Type: Feature/Change Request
Package: PHP_Beautifier
Operating System: Linux
Package Version: 0.1.13
PHP Version: 5.2.3
New Comment:

YES!! My project director just decided to use this against all our
code and stripping out all the blank lines has me all in a tizzy. I
agree with the above statement that code all squashed together is not
beautiful!

Thanks,
Alan


Previous Comments:
------------------------------------------------------------------------

[2009-04-21 22:35:34] mvanlamz

I agree that newlines should not be stripped. This is a total
deal-breaker for me. Code without blank lines is not more beautiful.

------------------------------------------------------------------------

[2008-09-12 15:40:33] sunsetbrew

I agree. The removal of all blank lines is very difficult to read.

------------------------------------------------------------------------

[2008-01-09 17:19:38] mrich

Yes! I can't believe this option is not part of this package already;
while correcting indentation certainly helps make a code file more
readable, stripping out all the empty lines can make it worse than the
original! I agree there should be a way to preserve newlines in the file
and specify a maximum number of consecutive newlines (IE empty lines).

------------------------------------------------------------------------

[2007-10-18 08:34:30] rigrig

Description:
------------
It would be nice if there was an option to leave blank lines, since
they could be there to improve readability.
Ideally there would be an option to
* replace all white space-only lines with an empty line
* specify a maximum number of blank lines in a row (I used 2 in my
example)

Test script:
---------------
//something followed by (too) many empty lines





//some more

//next line actually does something
echo ("Hello world!");

Expected result:
----------------
//something followed by (too) many empty lines


//some more

//next line actually does something
echo ("Hello world!");

Actual result:
--------------
//something followed by (too) many empty lines
//some more
//next line actually does something
echo ("Hello world!");

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedOct 16, '09 at 10:47p
activeOct 16, '09 at 10:47p
posts1
users1
websitepear.php.net

1 user in discussion

Harty83: 1 post

People

Translate

site design / logo © 2022 Grokbase