Fixed parsing string ending in links

Fixes #3.