Closed Leonya closed 4 years ago
The full list of TLDs is here: https://data.iana.org/TLD/tlds-alpha-by-domain.txt
It contains lots of really obscure ones, so I'm not sure that including all of them is a good idea (it's 10K of text). I can provide a shorter one, if you want.
@Leonya Can you provide examples of autolinks you'd like to parse? I think I tried to reverse-engineer the github markdown autolinks behaviour at the time.
Sure:
t.co/foo (Twitter URL shortener)
jetbrains.team/abc
yandex.ru
Basically anything that is a hostname.known-tld
should be turned into a link.
Doesn't it bother you that github does not linkininze such strings? I can surely do such change, but I suppose it's incorrect to call that GFM anymore
No, I believe it's fine. It's not the kind of extension that goes against the spirit of GFM. I've read the corresponding part of the spec and it doesn't strike me as especially thought through.
I've introduced SFM (space flavoured markdown) with proposed changes. A couple of coutry codes were still removed (e.g. .sh
) because bash files occur in text quite frequently.
Will update MPP branch a little bit later.
These two commits also need to be synced with the kotlin-js-clean
branch: f4c743257f242efdca2bfc5559f8327cd73a02ec, 31647e1ae9cfb469dbb78f050643ee73a81f5530
Force pushed kotlin-js-clean
Currently for a link to be detected as such it has to start with
http(s)://
orwww.
, this is too simplistic. Please add TLDs to the link detection function.