         var linkResults = [LinkResult]()
         
         for textLink in textLinks {
-            let linkType = LinkDetectionType.TextLink
+            let linkType = LinkDetectionType.textLink
             let matchString = textLink.text
             
             let range = textLink.range ?? NSMakeRange(0, text.characters.count)


open class ContextLabel: UILabel, NSLayoutManagerDelegate {
    
    public struct LinkDetectionType : OptionSet {
        public typealias RawValue = UInt
        fileprivate var value: UInt = 0
        init(_ value: UInt) { self.value = value }
        public init(rawValue value: UInt) { self.value = value }
        init(nilLiteral: ()) { self.value = 0 }
        static var allZeros: LinkDetectionType { return self.init(0) }
        static func fromMask(_ raw: UInt) -> LinkDetectionType { return self.init(raw) }
        public var rawValue: UInt { return self.value }
        
        static var None: LinkDetectionType { return self.init(0) }
        static var UserHandle: LinkDetectionType { return LinkDetectionType(1 << 0) }
        static var Hashtag: LinkDetectionType { return LinkDetectionType(1 << 1) }
        static var URL: LinkDetectionType { return LinkDetectionType(1 << 2) }
        static var TextLink: LinkDetectionType { return LinkDetectionType(1 << 3) }
    }
  
    let hashtagRegex = "(?<=\\s|^)#(\\w*[A-Za-z&_-]+\\w*)"

            linkResults += linkResultsForTextLinks(textLinks)
        }
        
        if linkDetectionTypes.contains(.userHandle) {
            linkResults += linkResultsForUserHandles(inString: attributedString.string)
        }

        if linkDetectionTypes.contains(.hashtag) {
            linkResults += linkResultsForHashtags(inString: attributedString.string)
        }

        if linkDetectionTypes.contains(.url) {
            linkResults += linkResultsForURLs(inAttributedString: attributedString)
        }

