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
201 stars 12 forks source link

Does not detect parameters in links #59

Closed A6GibKm closed 1 year ago

A6GibKm commented 1 year ago

The library does not detect parameters in links, e.g. upi://pay?pa=XXXXXXX&pn=XXXXX will only find the link upi://pay. instead of upi://pay?pa=XXXXXXX&pn=XXXXX. Its reasonable that if there is a single trailing ? (e.g. Open https::/example.com?) it won't be part of the link but otherwise it is likely the segment following it will be part of the link.

See https://gitlab.gnome.org/World/decoder/-/issues/65

robinst commented 1 year ago

Thanks! It already worked when there was a slash like this: upi://pay/?pa=XXXXXXX&pn=XXXXX

But if the path was empty it didn't work yet. Raised a PR to fix.

robinst commented 1 year ago

Fix released in version 0.10.0: https://github.com/robinst/linkify/blob/main/CHANGELOG.md#0100---2023-06-24

A6GibKm commented 1 year ago

Thanks, updated my app to make use of 0.10.