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: More 'of' prefixes
Date Tue, 31 Jul 2018 13:28:05 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 745bd42  More 'of' prefixes
745bd42 is described below

commit 745bd429d42359a16bb15ad6b2402375e0b7d14a
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Jul 31 14:28:04 2018 +0100

    More 'of' prefixes
---
 lib/whimsy/asf/person.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/whimsy/asf/person.rb b/lib/whimsy/asf/person.rb
index a0388dc..fb75d02 100644
--- a/lib/whimsy/asf/person.rb
+++ b/lib/whimsy/asf/person.rb
@@ -91,10 +91,10 @@ module ASF
       result['generationQualifier'] = words.pop if words.last =~ SUFFIXES
       result['givenName'] = words.shift # TODO does gn allow multiple words?
       # extract surnames like van Gogh etc
-      if words.size >= 3 and words[-3..-2] == %w(de la) or words[-3..-2] == %w(van der)
or words[-3..-2] == %w(van de) or words[-3..-2] == %w(van den)
+      if words.size >= 3 and words[-3..-2] == %w(de la) or words[-3..-2] == %w(van der)
or words[-3..-2] == %w(van de) or words[-3..-2] == %w(van den) or words[-3..-2] == %w(von
der)
         result['sn'] = words[-3..-1].join(' ')
         result['unused'] = words[0..-4]
-      elsif words.size >= 2 and %w(von van Van de De del Del den le Le O).include?  words[-2]
+      elsif words.size >= 2 and %w(von van Van de De del Del den le Le O Di Du dos).include?
 words[-2]
         result['sn'] = words[-2..-1].join(' ')
         result['unused'] = words[0..-3]
       else


Mime
View raw message