Java library to extract links (URLs, email addresses) from plain text; fast, small and smart
extractSpans
method that also returns the text pieces of the
input before, between and after links. This makes it more convenient
to write code that transforms the whole input text without having to
manually keep track of indexes.Autolink.renderLinks
and LinkRenderer
, see added (#21)"
. This is consistent with RFC 3986, and
it seems unlikely that a user would have an unescaped "
in an URL
anyway, as browsers escape it when copying an URL with it. (#21)www.example.com
as well (no need for http://
, but must start with www.
). This results a link with type LinkType.WWW
. To opt out of this, specify which link types should be extracted by calling the linkTypes
method on the builder. Thanks to @MTDdk for contributing this!">
, "/>
and ");
at the end of URLs (#3)Changes: