lychee icon indicating copy to clipboard operation
lychee copied to clipboard

Add support for URLs without scheme/protocol

Open mre opened this issue 4 years ago • 0 comments

linkify 0.8.0 was just released with an exciting new feature:

New option url_must_have_scheme on LinkFinder that can be set to false to allow URLs without scheme/protocol such as example.com.

Changelog here.

This would allow us to check even more links. 😃 We should add support for that behind a feature flag:

  • [x] Add flag --no-scheme, which is off by default.
  • [x] If --no-scheme is enabled, create linkify with the new feature:
    let mut link_finder = LinkFinder::new();
    link_finder.url_must_have_scheme(!no_scheme);
    
  • [x] Add tests

We could eventually even make this the default, although we have to do a lot of thorough testing before that.

Thanks to @robinst and @timvisee for working on this on the linkify side.

mre avatar Nov 26 '21 12:11 mre