parent
7fc29119db
commit
9c717d0873
|
@ -92,10 +92,12 @@ sub filter (@) { #{{{
|
||||||
# if it stopped in the middle of a word.
|
# if it stopped in the middle of a word.
|
||||||
my $size=512;
|
my $size=512;
|
||||||
my ($sample)=substr($toindex, 0, $size);
|
my ($sample)=substr($toindex, 0, $size);
|
||||||
my $next=substr($toindex, $size++, 1);
|
if (length($sample) == $size) {
|
||||||
while (defined $next && $next !~ /\s/) {
|
my $next=substr($toindex, $size++, 1);
|
||||||
$sample.=$next;
|
while (defined $next && $next !~ /\s/) {
|
||||||
$next=substr($toindex, $size++, 1);
|
$sample.=$next;
|
||||||
|
$next=substr($toindex, $size++, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$sample=~s/\n/ /g;
|
$sample=~s/\n/ /g;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue