Fix regular expression.
authorThomas Hochstein <thh@inter.net>
Wed, 11 Jan 2012 10:03:20 +0000 (11:03 +0100)
committerThomas Hochstein <thh@inter.net>
Sat, 21 Jan 2012 14:51:54 +0000 (15:51 +0100)
Support votenames longer than one line
(in fact, support votenames up to two lines long).

Signed-off-by: Thomas Hochstein <thh@inter.net>
uvvote.pl

index 836903a..67754d2 100755 (executable)
--- a/uvvote.pl
+++ b/uvvote.pl
@@ -241,8 +241,9 @@ sub process_vote {
   }
 
   # correct voting?
-  if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*$/m) {
+  if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*\n(.*?[\t ]+(\S+.+)\s*$)?/m) {
     $voting = $1;
+    $voting .= " $3" if defined($3);
     push (@errors, 'WrongVoting') if ($config{votename} !~ /^\s*\Q$voting\E\s*$/);
   } else {
     push (@errors, 'NoVoting');
This page took 0.010955 seconds and 4 git commands to generate.