linkify icon indicating copy to clipboard operation
linkify copied to clipboard

Linkify doesnt identify the mail.google.com type of links

Open mathankumarcv opened this issue 14 years ago • 4 comments

It doesnt identify the urls like mail.google.com

and also it identifies www.something (without .com,.edu etc)as a link

mathankumarcv avatar Dec 23 '10 09:12 mathankumarcv

the www.foo (without TLD) thing is a bug. I will look into it.

Just some quick thoughts, regarding the mail.google.com issue:

Two things I like to avoid:

  1. False positives - like turning Java-package names, or other dot-delimited strings into broken URLs.
  2. Bias towards a limited number of TLDs - because I'm from .is and all the special-casing .com/.org/.net that I see every day, annoys me. :-)
  3. Adding too much bloat to the core plugin.

So, at the moment, I lean towards having the core plugin not doing this.

However, this seems like a great idea for an optional plugin.

maranomynet avatar Dec 23 '10 11:12 maranomynet

thanks maranomynet.......

mathankumarcv avatar Dec 29 '10 08:12 mathankumarcv

LOL @ GitHub's linkifer - it also turns "www.something" into a hyperlink.

I wouldn't consider a proper regexp "bloat".

The original linkify library has a list of actual TLDs. Unfortunately it hasn't been maintained in 4 years, or I'd recommend using it instead of this one.

dandv avatar Feb 21 '14 02:02 dandv

Well I haven't maintained this plugin for 3 years, so there's not much difference, I guess :-) Oh, and I didn't know of Alman's same-name plugin. I just wrote this one, gave it a too obvious name and threw it in here.

Anyway, it wasn't so much the RegExp that I was afraid would cause bloat - but rather whatever code might be needed to handle edge-cases and avoid false-positives.

If I were to play around with this today (which I'm unlikely to do), I'd probably add a simple RegExp and an option to turn it off if the false-positives annoy you.

maranomynet avatar Feb 21 '14 09:02 maranomynet