Remove blank lines bug?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Remove blank lines bug?

Post by dfhtextpipe »

I have just discovered that the Remove blank lines filter does not remove the last line of a file if it happens to be blank but without its own EOL.

i.e. When the last line but one has an EOL after its text, but the line below has no EOL.

This comprehensive sub-filter fails to remove these!

Code: Select all

Comment...
|  Remove blank lines
|
|--Remove blanks from Start of Line
|   
|--Remove blanks from End of Line
|   
|--Remove multiple whitespace
|   
+--Remove blank lines
    
This has an impact when you want to merge output files.

In order to ensure that there is an EOL between files, before merging I used the Add footer filter to add a single EOL.
Otherwise, when the last line of a file as no EOL after its text, you could end up with two lines joined together.

However, files with the described symptoms leave a blank line in the merged output file.
As you cannot perform further processing after the output filter, I haven't found a simple solution.
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Remove blank lines bug?

Post by DataMystic Support »

You can perform a Special\Merge prior to the end of the filter, but I will look into the problem.
Post Reply