From: Jeroen van Wolffelaar Date: Thu, 2 Feb 2006 00:16:06 +0000 (+0000) Subject: Drop NUL characters and collate whitespace in descriptions.txt X-Git-Tag: switch-to-templates~208 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=4180f4a4fedc35765e9f9063cbfa305d5d55d55b;p=deb%2Fpackages.git Drop NUL characters and collate whitespace in descriptions.txt --- diff --git a/bin/parse-packages b/bin/parse-packages index 40c4356..4fd7e34 100755 --- a/bin/parse-packages +++ b/bin/parse-packages @@ -154,9 +154,10 @@ tie %descriptions_db, "DB_File", "descriptions.db.new", or die "Error creating DB: $!"; open DESCR, "> descriptions.txt" or die "Error creating descriptions textfile"; for (my $i=1; $i<= $#descriptions; $i++) { - my $null_d = $descriptions[$i]; - $null_d =~ s/\n/\000/g; - print DESCR "$null_d\n"; + my $plain_description = $descriptions[$i]; + $plain_description =~ s/\n .\n/ /og; + $plain_description =~ s/[\n \t]+/ /og; + print DESCR "$plain_description\n"; $descriptions_db{$i} = $descriptions[$i]; } close DESCR;