From 3c7c1ce0a7c2104f64cd88112b85a971cf0b3e19 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 26 Apr 2020 20:46:39 +0100 Subject: [PATCH] normalise: Fix to cope with no options on candidate definition Signed-off-by: Ian Jackson --- normalise | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.30.2