Add handle_href option for href pre-processing
The implementation of this is different from mention_handler
and hashtag_handler
, because the intent is to just process the href, not to have full control over generating the anchor element itself.
This makes it easy to use with Phoenix router helpers, specifically for generating exit links (as mentioned in the original issue). Example:
Linkify.link my_text, href_handler: &Routes.exit_link_path(MyApp.Endpoint, :redirect, to: &1)
Closes #19 (closed)