Revision: 9528
          http://sourceforge.net/p/skim-app/code/9528
Author:   hofman
Date:     2017-12-06 17:05:33 +0000 (Wed, 06 Dec 2017)
Log Message:
-----------
check for newline to break anchored note string

Modified Paths:
--------------
    trunk/SkimNotes/skimpdf.m

Modified: trunk/SkimNotes/skimpdf.m
===================================================================
--- trunk/SkimNotes/skimpdf.m   2017-12-05 22:14:46 UTC (rev 9527)
+++ trunk/SkimNotes/skimpdf.m   2017-12-06 17:05:33 UTC (rev 9528)
@@ -319,6 +319,9 @@
                             [mutableNote setObject:NSStringFromRect(bounds) 
forKey:SKNPDFAnnotationBoundsKey];
                             if (contents) {
                                 NSRange r = [contents rangeOfString:@"  "];
+                                NSRange r1 = [contents rangeOfString:@"\n"];
+                                if (r1.location < r.location)
+                                    r = r1;
                                 if (NSMaxRange(r) < [contents length]) {
                                     NSAttributedString *attrString = 
[[[NSAttributedString alloc] initWithString:[contents 
substringFromIndex:NSMaxRange(r)]] autorelease];
                                     [mutableNote setObject:attrString 
forKey:SKNPDFAnnotationTextKey];

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
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to