     
     /// Called when a link is long pressed.
     @objc optional func linkLabel(_ label: INDLinkLabel, didLongPressLinkWithURL URL: URL)
-
+    
     /// Called when parsing links from attributed text.
     /// The delegate may determine whether to use the text's original attributes,
     /// use the proposed INDLinkLabel attributes (blue text color, and underlined),

    }
    
    open override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
        // Any taps that don't hit a link are ignored and passed to the next 
        // responder.
        return linkRangeAtPoint(point) != nil
    }
    
    open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        if let touch = touches.first {
            tappedLinkRange = linkRangeAtPoint(touch.location(in: self))
            setNeedsDisplay()
        }
    }
    
    open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
        tappedLinkRange = nil
        setNeedsDisplay()
    }
    
    open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
        tappedLinkRange = nil
        setNeedsDisplay()
    }
    
    @objc fileprivate func handleTap(_ gestureRecognizer: UIGestureRecognizer) {
        if let linkRange = tappedLinkRange {
            delegate?.linkLabel?(self, didTapLinkWithURL: linkRange.URL)
        }
    }
    
    @objc fileprivate func handleLongPress(_ gestureRecognizer: UIGestureRecognizer) {
        if let linkRange = tappedLinkRange {
            delegate?.linkLabel?(self, didLongPressLinkWithURL: linkRange.URL)
        }

    }
    
    fileprivate var linkRanges: [LinkRange]?
    fileprivate var tappedLinkRange: LinkRange? {
        didSet {
            setNeedsDisplay()
        }
    }
    
    // MARK: Initialization
    
