autolink-js icon indicating copy to clipboard operation
autolink-js copied to clipboard

What about links without protocol but has www?

Open hammertimedk opened this issue 11 years ago • 6 comments

What about url's without protocol, but where a user has entered dub dub dub? I'd say something like www.google.com should be autolinked if found in a string ... Am I missing something? :)

hammertimedk avatar Feb 08 '14 15:02 hammertimedk

Maybe for extra fancyness look for common tld's in the string instead of relying on www as users might type in something.com/org/net/whatever

hammertimedk avatar Feb 08 '14 15:02 hammertimedk

@hammertimedk: check out more advanced libraries - see issue #12.

dandv avatar Feb 21 '14 04:02 dandv

Why not, if there will be PR that will do that and will be tested - it will be nice addition

After all pretty of this library is that it is lightweight and have no dependencies

mac2000 avatar Feb 21 '14 07:02 mac2000

@mac2000: the Component URL regexp is way more lightweight and has no dependencies.

It's used by https://github.com/juliangruber/find-urls

dandv avatar Feb 21 '14 07:02 dandv

Oh, I see, thank you for your response it is really cool

May be we should also use that regexps to make this library DRY and recognizable by other developers

mac2000 avatar Feb 21 '14 07:02 mac2000

@dandv I would happily merge a pull request that uses that component URL regexp if the existing tests pass.

@mac2000 I think that's a great idea :)

bryanwoods avatar Mar 03 '14 22:03 bryanwoods