1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Port r6710 from puzzles:

Patch from Ben Hutchings to prevent an ugly special case in
&splitline in which a line is `split' into a line ending in a
backslash followed by a completely blank line.

[originally from svn r6714]
[r6710 == fd90d1a7c8224e673361d8b23aadfa01829de77c in puzzles repository]
This commit is contained in:
Jacob Nevins 2006-05-21 12:20:42 +00:00
parent 024c84e063
commit 5a81457608

View File

@ -300,7 +300,8 @@ sub splitline {
$splitchar = (defined $splitchar ? $splitchar : '\\');
while (length $line > $len) {
$line =~ /^(.{0,$len})\s(.*)$/ or $line =~ /^(.{$len,}?\s(.*)$/;
$result .= $1 . " ${splitchar}\n\t\t";
$result .= $1;
$result .= " ${splitchar}\n\t\t" if $2 ne '';
$line = $2;
$len = 60;
}