Changeset 3019

Show
Ignore:
Timestamp:
10/21/05 16:11:51 (3 years ago)
Author:
eridius
Message:

Fix hyperlink regex to match IP addresses as well

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Colloquy.xcodeproj/project.pbxproj

    r3014 r3019  
    601601                1CABFD0C0658629200801C15 /* JVStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JVStyle.h; sourceTree = "<group>"; }; 
    602602                1CABFD0D0658629200801C15 /* JVStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JVStyle.m; sourceTree = "<group>"; }; 
    603                 1CB2CD8C052DDC570094AAA4 /* Colloquy.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Colloquy.app; sourceTree = BUILT_PRODUCTS_DIR; }; 
     603                1CB2CD8C052DDC570094AAA4 /* Colloquy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Colloquy.app; sourceTree = BUILT_PRODUCTS_DIR; }; 
    604604                1CB3716F060CC7E200F6A81F /* KABubbleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KABubbleWindowController.h; sourceTree = "<group>"; }; 
    605605                1CB37170060CC7E200F6A81F /* KABubbleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KABubbleWindowController.m; sourceTree = "<group>"; }; 
  • trunk/NSAttributedStringMoreAdditions.m

    r2991 r3019  
    309309- (void) makeLinkAttributesAutomatically { 
    310310        // catch well-formed urls like "http://www.apple.com", "www.apple.com" or "irc://irc.javelin.cc" 
    311         AGRegex *regex = [AGRegex regexWithPattern:@"(?:[a-zA-Z][a-zA-Z0-9+.-]*://|www\\.)(?:[\\w-:]+@)?(?:(?:[\\p{L}\\p{N}-]+\\.)+\\w{2,4}\\.?|localhost)(?:\\:\\d+)?(?:[/?][\\p{L}\\p{N}$\\-_.+!*',=:\\|/\\\\()%@&;#?~]*)*(?=[>}\\]):;,.!?'\"]|\\b)" options:AGRegexCaseInsensitive]; 
     311        AGRegex *regex = [AGRegex regexWithPattern:@"(?:[a-zA-Z][a-zA-Z0-9+.-]*://|www\\.)(?:[\\w:-]+@)?(?:\\d{1,3}(?:\\.\\d{1,3}){3}|(?:[\\p{L}\\p{N}-]+\\.)+\\w{2,4}\\.?|localhost)(?:\\:\\d+)?(?:[/?][\\p{L}\\p{N}$\\-_.+!*',=:\\|/\\\\()%@&;#?~]*)*(?=[>}\\]):;,.!?'\"]|\\b)" options:AGRegexCaseInsensitive]; 
    312312        NSArray *matches = [regex findAllInString:[self string]]; 
    313313        NSEnumerator *enumerator = [matches objectEnumerator];