Fixed bug in uri parser.

The bug prevented an autolink at the end of a string (e.g.
at the end of a line block line) from counting as a link.

Closes #711.