From: Ian Jackson Date: Sun, 26 Apr 2020 19:46:39 +0000 (+0100) Subject: normalise: Fix to cope with no options on candidate definition X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=3c7c1ce0a7c2104f64cd88112b85a971cf0b3e19;p=appendix-a6.git normalise: Fix to cope with no options on candidate definition Signed-off-by: Ian Jackson --- diff --git a/normalise b/normalise index 0af8f19..ff5c3c2 100755 --- a/normalise +++ b/normalise @@ -96,9 +96,9 @@ while (<>) { s/\s+$//; if (m/^\|/) { push @options, normalise_opts_list $', 'Election'; - } elsif (m/^($candvoter_re?)\s*=\s*([^|]+?)\s*\|(.*)?$/o) { + } elsif (m/^($candvoter_re?)\s*=\s*([^|]+?)\s*(?:\|(.*))?$/o) { use Data::Dumper; -print STDERR Dumper($1,$2,$3); +#print STDERR Dumper($1,$2,$3); my ($cand,$desc,$opts) = ($1,$2,$3); push @{ $candidates{$cand}{Opts} }, normalise_opts $opts, 'Candidate'; setcanddesc $cand, $desc;