adium 5582:ac2d267c77af: When scanning for links, the current lo...

commits at adium.im commits at adium.im
Sat Jun 22 04:41:41 UTC 2013


details:	http://hg.adium.im/adium/rev/ac2d267c77af
revision:	5582:ac2d267c77af
branch:		(none)
author:		Frank Dowsett <wixardy at adium.im>
date:		Sat Jun 22 00:40:15 2013 -0400

When scanning for links, the current location wasn't being updated before checking/creating a link leading to the next pass starting from before the last URL ended. This fixes #16217 and 16413.

diffs (22 lines):

diff -r 5253785a92a9 -r ac2d267c77af Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m
--- a/Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m	Thu Jun 20 11:21:59 2013 -0400
+++ b/Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m	Sat Jun 22 00:40:15 2013 -0400
@@ -32,7 +32,7 @@
 #define ENC_INDEX_KEY @"encIndex"
 #define ENC_CHAR_KEY @"encChar"
 
-#define MIN_LINK_LENGTH 0
+#define MIN_LINK_LENGTH 4
 
 @interface AHHyperlinkScanner (PRIVATE)
 - (AHMarkedHyperlink *)nextURIFromLocation:(unsigned long *)_scanLocation;
@@ -286,6 +286,9 @@
                 }else break;
             }
             
+            // Update the scan location
+            m_scanLocation = scannedRange.location;
+            
             // if we have a valid URL then save the scanned string, and make a SHMarkedHyperlink out of it.
             // this way, we can preserve things like the matched string (to be converted to a NSURL),
             // parent string, its validation status (valid, file, degenerate, etc), and its range in the parent string




More information about the commits mailing list