From: Simon Tatham Date: Sat, 20 May 2006 11:58:24 +0000 (+0000) Subject: Patch from Ben Hutchings to prevent an ugly special case in X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=fd90d1a7c8224e673361d8b23aadfa01829de77c;p=sgt-puzzles.git 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 r6710] --- diff --git a/mkfiles.pl b/mkfiles.pl index b93e4fa..9ab5223 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -325,7 +325,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; }