chiark
/
gitweb
/
~ian
/
appendix-a6.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96c76d2
)
normalise: Fix to cope with no options on candidate definition
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 26 Apr 2020 19:46:39 +0000
(20:46 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 26 Apr 2020 19:46:39 +0000
(20:46 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
normalise
patch
|
blob
|
history
diff --git
a/normalise
b/normalise
index 0af8f19623d021aa3d9c34f912fc3be0584fc908..ff5c3c22abd5b50821473a2cad6da580685960cd 100755
(executable)
--- 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;