On Thu, 22 May 2014, David B Funk wrote:
On Thu, 22 May 2014, Karsten Bräckelmann wrote:
On Thu, 2014-05-22 at 03:12 +0200, Karsten Bräckelmann wrote:
[snip..]
The number of continuation lines equals the number of newlines in the
test-case.
Well, up until 12, that is. :-/
Any number up to 11 of consecutive newlines can be matched with rawbody
rules. However, 12 or more consecutive newlines will be squeezed and
replaced by exactly two newlines.
I've had a quick look at the code already, but did not yet find where
the supposedly raw (sic) body gets altered.
Look at Message.pm, around line 300:
# if we've got a series of blank lines, get rid of them
if (defined $start) {
my $num = $start-$cnt;
if ($num > 10) {
splice @message, $cnt+2, $num-1;
}
After doing some experimenting with that code I came up with something that
I'd argue is more semantically correct:
# if we've got a long series of blank lines, limit them
if (defined $start) {
my $max_blank_lines = 20;
my $num = $start-$cnt;
if ($num > $max_blank_lines) {
splice @message, $cnt+2, $num-$max_blank_lines;
}
undef $start;
}
IE limit a message to no more than "$max_blank_lines" in a row, not the total
collapse of more than 11. (adjust $max_blank_lines as you see fit or make it
a configurable parameter).
After making that change, I found rules like "BLANK_LINES_60_70 BODY:
Message is at least 60% blank lines" started firing on a test message
that I was using. So could argue by that total collapse of large blocks of
lines the creators of that code are torpedoing rules like BLANK_LINES_60_70.
--
Dave Funk University of Iowa
<dbfunk (at) engineering.uiowa.edu> College of Engineering
319/335-5751 FAX: 319/384-0549 1256 Seamans Center
Sys_admin/Postmaster/cell_admin Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{