Revision: 22159 http://sourceforge.net/p/bibdesk/svn/22159 Author: hofman Date: 2018-03-28 09:58:45 +0000 (Wed, 28 Mar 2018) Log Message: ----------- remove punctuation from dois scraped from web content
Modified Paths: -------------- trunk/bibdesk/BDSKDOIWebParser.m Modified: trunk/bibdesk/BDSKDOIWebParser.m =================================================================== --- trunk/bibdesk/BDSKDOIWebParser.m 2018-03-28 09:41:50 UTC (rev 22158) +++ trunk/bibdesk/BDSKDOIWebParser.m 2018-03-28 09:58:45 UTC (rev 22159) @@ -112,7 +112,7 @@ doiRegex = [AGRegex regexWithPattern:@"(doi:[ \\t]*|https?://(dx\\.)?doi\\.org/)(10\\.[0-9]{4,}(\\.[0-9]+)*/\\S+)" options:AGRegexCaseInsensitive]; for (match in [doiRegex findAllInString:text]) { - doi = [match groupAtIndex:3]; + doi = [[match groupAtIndex:3] stringByTrimmingCharactersInSet:[NSCharacterSet punctuationCharacterSet]]; if ([[match groupAtIndex:1] hasPrefix:@"http"] == NO) doi = [doi stringByAddingPercentEscapes]; if ([dois containsObject:doi] == NO) 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 Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit