Do not linkify trailing dot or comma

When using urls in sentences, those urls are often followed by a dot,
or a comma. Like:

  You can find more information at http://example.com/foo.html.

While "http://example.com/foo.html." would be a perfectly fine url,
most of the time, the link is meant to not include trailing dot or
trailing comma (like in the above example, the link should only link

  http://example.com/foo.html

and not

  http://example.com/foo.html.

). As linkifying trailing dots and trailing commas does more harm than
good, we only treat dots and commas as being part of urls, if they are
neither followed by whitespace nor occur at the end of a string.

Change-Id: I9a7e42e53f8c7ac746af45967beac380705a2711
2 files changed