chiark / gitweb /
Commods: strip whitespace from ends of stall names in tsvs (!)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 6 Jan 2012 01:09:21 +0000 (01:09 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 23 Jan 2012 02:31:58 +0000 (02:31 +0000)
(cherry picked from commit a203bc7861fa98862f6b887d07fe824d790e001b)

yarrg/Commods.pm

index f3ae56f..4267034 100644 (file)
@@ -425,6 +425,7 @@ sub check_tsv_line ($$) {
     $l !~ m/\P{IsPrint}/ or &$bad_data('nonprinting char(s)');
     my @v= split /\t/, $l, -1;
     @v==6 or &$bad_data('wrong number of fields');
+    $v[1] =~ s/^\s+//; $v[1] =~ s/\s+$//; # ooo don't check :-(
     my ($commod,$stall) = @v;
 
     !keys %commods or