whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Try to fix Index Error regexp not matched
Date Sun, 24 Mar 2019 20:08:26 GMT
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 7f4cdb4  Try to fix Index Error regexp not matched
7f4cdb4 is described below

commit 7f4cdb4008ff793608615e98549f328da0eae1b9
Author: Sebb <sebb@apache.org>
AuthorDate: Sun Mar 24 20:08:16 2019 +0000

    Try to fix Index Error regexp not matched
    
    #<IndexError: regexp not matched>
      /x1/srv/whimsy/www/members/proxy.cgi:207:in `[]='
---
 www/members/proxy.cgi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/members/proxy.cgi b/www/members/proxy.cgi
index bc742c4..213602a 100755
--- a/www/members/proxy.cgi
+++ b/www/members/proxy.cgi
@@ -203,8 +203,8 @@ _html do
       user = ASF::Person.find($USER)
       date = Date.today.strftime("%B %-d, %Y")
 
-      # update proxy form
-      proxy[/authorize _(#{'_' *@proxy.length})/, 1] = @proxy.gsub(' ', '_')
+      # update proxy form (match as many _ as possible up to the name length)
+      proxy[/authorize _(_{,#{@proxy.length}})/, 1] = @proxy.gsub(' ', '_')
 
       proxy[/signature: _(_#{'_' *user.public_name.length}_)/, 1] = 
         "/#{user.public_name.gsub(' ', '_')}/"


Mime
View raw message