robinst / linkify

Rust library to find links such as URLs and email addresses in plain text, handling surrounding punctuation correctly
https://robinst.github.io/linkify/
Apache License 2.0
206 stars 12 forks source link

Add test for parsing image URLs #14

Closed mre closed 3 years ago

mre commented 3 years ago

Over at https://github.com/lycheeverse/lychee-action/issues/5, we are facing issues with parsing file URLs, specifically inside HTML. Initially I thought the issue was with linkify, so I wrote a quick test to verify my assumption. Turns out this is not the case and linkify is doing fine. The bug must be elsewhere. Nevertheless I was wondering if it's a good idea to add a test for file types to make sure that the parsing doesn't break in the future. I kept the HTML part because I think it's a very common case to have image URLs embedded inside HTML. Let me know what you think and if I should simplify the test.

robinst commented 3 years ago

Thanks :)