Subject: | Text::LineFold and forced linefold |
Hello,
if a string is folded by 'FORCE', it looks like the INITIAL_TAB and SUBSEQUENT_TAB are not considered when calculating the breakpoint.
use Text::LineFold;
use 5.10.0;
say $Text::LineFold::VERSION;
my $colmax = 20;
my $lf = Text::LineFold->new( Urgent => 'FORCE', Colmax => $colmax );
my $text;
say '-' x $colmax;
$text = 'xx' x 30;
$text = $lf->fold( '', ' ' x 4, $text );
print $text;
$text = 'x/' x 30;
$text = $lf->fold( '', ' ' x 4, $text );
print $text;
outputs
2012.04
--------------------
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
x/x/x/x/x/x/x/x/x/x/
x/x/x/x/x/x/x/x/
x/x/x/x/x/x/x/x/
x/x/x/x/
(I hope the formatting remains unchanged.)