Revision: 22407
          http://sourceforge.net/p/bibdesk/svn/22407
Author:   hofman
Date:     2018-07-11 22:00:49 +0000 (Wed, 11 Jul 2018)
Log Message:
-----------
allow extra optional number at end of etal argument in name format specifiers 
for number of names with etal

Modified Paths:
--------------
    trunk/bibdesk/BDSKFormatParser.m

Modified: trunk/bibdesk/BDSKFormatParser.m
===================================================================
--- trunk/bibdesk/BDSKFormatParser.m    2018-07-11 21:14:27 UTC (rev 22406)
+++ trunk/bibdesk/BDSKFormatParser.m    2018-07-11 22:00:49 UTC (rev 22407)
@@ -181,7 +181,12 @@
                                        }
                                        if (numAuth == 0 || numAuth > 
[authArray count]) {
                                                numAuth = [authArray count];
-                                       }
+                    } else if (numAuth < [authArray count] && [[NSCharacterSet 
decimalDigitCharacterSet] characterIsMember:[etal lastCharacter]]) {
+                        i = (NSUInteger)[[etal substringFromIndex:[etal 
length] - 1] integerValue];
+                        etal = [etal substringToIndex:[etal length] - 1];
+                        if (i > 0 && i < numAuth)
+                            numAuth = i;
+                    }
                                        for (i = 0; i < numAuth; i++) {
                                                if (i > 0) {
                                                        [parsedStr 
appendString:authSep];
@@ -251,7 +256,12 @@
                                        }
                                        if (numAuth == 0 || numAuth > 
[authArray count]) {
                                                numAuth = [authArray count];
-                                       }
+                    } else if (numAuth < [authArray count] && [[NSCharacterSet 
decimalDigitCharacterSet] characterIsMember:[etal lastCharacter]]) {
+                        i = (NSUInteger)[[etal substringFromIndex:[etal 
length] - 1] integerValue];
+                        etal = [etal substringToIndex:[etal length] - 1];
+                        if (i > 0 && i < numAuth)
+                            numAuth = i;
+                    }
                                        for (i = 0; i < numAuth; i++) {
                                                if (i > 0) {
                                                        [parsedStr 
appendString:authSep];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to