Skip to content

add handling of NSLinkAttributedName attribute for URL Link#26

Open
vhosune wants to merge 3 commits intoKrelborn:developfrom
vhosune:develop
Open

add handling of NSLinkAttributedName attribute for URL Link#26
vhosune wants to merge 3 commits intoKrelborn:developfrom
vhosune:develop

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