This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new eb17ee4  Don't save an empty line
eb17ee4 is described below

commit eb17ee48434355205affc1add83005a9b1a8d8db
Author: Sebb <[email protected]>
AuthorDate: Mon Aug 2 13:20:47 2021 +0100

    Don't save an empty line
---
 www/secretary/iclaparser.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/secretary/iclaparser.rb b/www/secretary/iclaparser.rb
index 623ccbe..252caf2 100644
--- a/www/secretary/iclaparser.rb
+++ b/www/secretary/iclaparser.rb
@@ -243,7 +243,7 @@ module ICLAParser
                 line = lines.map{|l| l.sub(/^[ _]+/,'').sub(/[ 
_]+$/,'')}.select{|l| l.length > 0}.join(',')
                 case line
                   when /^\s*(?:\(optional\) )?(.+):\s+(.*)/
-                    data[canon_field_name($1)] = $2 unless $2 == ',' # empty 
line
+                    data[canon_field_name($1)] = $2 unless $2 == ',' or $2 == 
'' # empty line
                   else
                     data[:unmatched] ||= []
                     data[:unmatched] << line

Reply via email to