Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add handling of NSLinkAttributedName attribute for URL Link #26

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

add handling of NSLinkAttributedName attribute for URL Link #26

wants to merge 3 commits into from

Conversation

vhosune
Copy link

@vhosune vhosune commented Jun 4, 2015

add handling of NSAttributedString NSLinkAttributedName attribute as an URL link

@Krelborn
Copy link
Owner

Krelborn commented Jun 4, 2015

Thanks for doing this. It looks like a fairly straightforward addition.

I think there is one problem where we will end up with duplicate matches if the link text matches the regex and there is a link attribute as well.

When the link attributes block is called it should check the range of the match against the array of matches that was returned by the regex to avoid the clash.

If we don't do this then blocks could get called twice for the same range. The link classifiers should call their tap handler once for each detected range.

Cheers.

@vhosune
Copy link
Author

vhosune commented Jun 9, 2015

It will take the first match

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants