Revision: 18110
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18110&view=rev
Author: hofman
Date: 2011-09-07 12:03:45 +0000 (Wed, 07 Sep 2011)
Log Message:
-----------
collapse newlines before comparing front matter for writing
Modified Paths:
--------------
trunk/bibdesk/BibDocument.m
Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2011-09-07 06:35:50 UTC (rev 18109)
+++ trunk/bibdesk/BibDocument.m 2011-09-07 12:03:45 UTC (rev 18110)
@@ -1474,8 +1474,8 @@
[templateFile appendFormat:@"\n%%%% Saved with string encoding %@
\n\n", encodingName];
// remove all whitespace so we can make a comparison; just collapsing
isn't quite good enough, unfortunately
- NSString *collapsedTemplate = [templateFile
stringByRemovingWhitespace];
- NSString *collapsedFrontMatter = [frontMatter
stringByRemovingWhitespace];
+ NSString *collapsedTemplate = [[templateFile
stringByRemovingWhitespace]
stringByCollapsingAndTrimmingCharactersInSet:[NSCharacterSet
newlineCharacterSet]];
+ NSString *collapsedFrontMatter = [[frontMatter
stringByRemovingWhitespace]
stringByCollapsingAndTrimmingCharactersInSet:[NSCharacterSet
newlineCharacterSet]];
if([NSString isEmptyString:collapsedFrontMatter]){
shouldAppendFrontMatter = NO;
}else if([collapsedTemplate
rangeOfString:collapsedFrontMatter].length){
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit