adium-1.4 2577:19c704d73e7f: Add em and en dashes to the start s...
commits at adium.im
commits at adium.im
Wed Aug 12 17:30:54 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/19c704d73e7f
revision: 2577:19c704d73e7f
author: Stephen Holt <sholt at adium.im>
date: Wed Aug 12 13:32:55 2009 -0400
Add em and en dashes to the start set. Fixes #11490
diffs (24 lines):
diff -r b5679b7664e4 -r 19c704d73e7f Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m
--- a/Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m Wed Aug 12 11:15:07 2009 -0400
+++ b/Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m Wed Aug 12 13:32:55 2009 -0400
@@ -93,7 +93,7 @@
if (!startSet) {
NSMutableCharacterSet *mutableStartSet = [[NSMutableCharacterSet alloc] init];
[mutableStartSet formUnionWithCharacterSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
- [mutableStartSet formUnionWithCharacterSet:[NSCharacterSet characterSetWithCharactersInString:@"\"'.,:;<?!-@"]];
+ [mutableStartSet formUnionWithCharacterSet:[NSCharacterSet characterSetWithCharactersInString:[NSString stringWithFormat:@"\"'.,:;<?!-@%C%C", 0x2014, 0x2013]]];
startSet = [[NSCharacterSet characterSetWithBitmapRepresentation:[mutableStartSet bitmapRepresentation]] retain];
[mutableStartSet release];
}
diff -r b5679b7664e4 -r 19c704d73e7f Frameworks/AutoHyperlinks Framework/UnitTests/HyperlinkContextTest.m
--- a/Frameworks/AutoHyperlinks Framework/UnitTests/HyperlinkContextTest.m Wed Aug 12 11:15:07 2009 -0400
+++ b/Frameworks/AutoHyperlinks Framework/UnitTests/HyperlinkContextTest.m Wed Aug 12 13:32:55 2009 -0400
@@ -64,6 +64,8 @@
- (void)testURIBorder:(NSString *)URIString {
[self testLaxContext:@":%@" withURI:URIString];
+ [self testLaxContext:@"—%@" withURI:URIString];
+ [self testLaxContext:@"–%@" withURI:URIString];
[self testLaxContext:@"check it out:%@" withURI:URIString];
[self testLaxContext:@"%@:" withURI:URIString];
[self testLaxContext:@"%@." withURI:URIString];
More information about the commits
mailing list