diff --git a/www/txt2plain.pl b/www/txt2plain.pl index ec49adbcdb..72640522b6 100755 --- a/www/txt2plain.pl +++ b/www/txt2plain.pl @@ -2,22 +2,28 @@ # this is really a faq2html and should only be used for this purpose -while() { - +sub fixline { $_ =~ s/\/>/g; - $_ =~ s/(http:\/\/([a-zA-Z0-9_.\/-]*)[^\).])/\$1\<\/a\>/g; + $_ =~ s/(http:\/\/([a-zA-Z0-9_.\/-]*)[^\) .\n])/\$1\<\/a\>/g; $_ =~ s/^$/\ /g; # empty lines are nbsp $_ =~ s/(\\|\/)$/$1 /g; # clobber backslash on end of line +} +while() { + + fixline($_); # detect and mark Q-sections if( $_ =~ /^Q(\d*)/) { print "\n

$_"; my $line; while() { + + fixline($_); + $line = $_; if($_ !~ /^A/) { print "$_";