diff --git a/www/txt2plain.pl b/www/txt2plain.pl index 72640522b6..287e8787d8 100755 --- a/www/txt2plain.pl +++ b/www/txt2plain.pl @@ -8,7 +8,7 @@ sub fixline { $_ =~ s/(http:\/\/([a-zA-Z0-9_.\/-]*)[^\) .\n])/\$1\<\/a\>/g; - $_ =~ s/^$/\ /g; # empty lines are nbsp + $_ =~ s/^\s*$/\ \n/g; # empty lines are nbsp $_ =~ s/(\\|\/)$/$1 /g; # clobber backslash on end of line } @@ -18,7 +18,7 @@ while() { # detect and mark Q-sections if( $_ =~ /^Q(\d*)/) { - print "\n

$_"; + print "\n

$_"; my $line; while() { @@ -32,7 +32,7 @@ while() { last; } } - print "

\n
\n$line";
+        print "
\n
$line";
         next;
     }