linkifyjs icon indicating copy to clipboard operation
linkifyjs copied to clipboard

`example.com?foo=bar` detected as `http://example.com` instead of `http://example.com/?foo=bar`

Open KaKi87 opened this issue 7 months ago • 0 comments

Hi,

                                                   // +-----------------------------+--------------------+
                                                   // | Expected                    | Actual             |
import { find } from 'linkifyjs';                  // +-----------------------------+--------------------+
console.log(find('example.com/?foo=bar')[0].href); // | http://example.com/?foo=bar | Same               |
console.log(find('example.com?foo=bar')[0].href);  // | http://example.com/?foo=bar | http://example.com |
                                                   // +-----------------------------+--------------------+

Thanks

KaKi87 avatar May 27 '25 11:05 KaKi87