Page 1 of 1

Remove blank lines bug?

Posted: Mon May 06, 2013 5:54 pm
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.

Re: Remove blank lines bug?

Posted: Mon May 06, 2013 10:15 pm
by DataMystic Support
You can perform a Special\Merge prior to the end of the filter, but I will look into the problem.