Only fuzzy linkify TLDs in place in 2010
This commit is contained in:
parent
ea7ea5e8f6
commit
3ca547f3dd
1 changed files with 27 additions and 1 deletions
|
@ -5,7 +5,33 @@ import LinkifyIt from 'linkify-it';
|
||||||
import { RenderTextCallbackType } from '../../types/Util';
|
import { RenderTextCallbackType } from '../../types/Util';
|
||||||
import { isLinkSneaky } from '../../../js/modules/link_previews';
|
import { isLinkSneaky } from '../../../js/modules/link_previews';
|
||||||
|
|
||||||
const linkify = LinkifyIt();
|
const linkify = LinkifyIt()
|
||||||
|
// This is all of the TLDs in place in 2010, according to [Wikipedia][0]. Note that
|
||||||
|
// this only applies to "fuzzy" matches (`example.com`), not matches with
|
||||||
|
// protocols (`https://example.com`).
|
||||||
|
// [0]: https://en.wikipedia.org/wiki/Generic_top-level_domain#History
|
||||||
|
.tlds([
|
||||||
|
'aero',
|
||||||
|
'asia',
|
||||||
|
'biz',
|
||||||
|
'cat',
|
||||||
|
'com',
|
||||||
|
'coop',
|
||||||
|
'edu',
|
||||||
|
'gov',
|
||||||
|
'info',
|
||||||
|
'int',
|
||||||
|
'jobs',
|
||||||
|
'mil',
|
||||||
|
'mobi',
|
||||||
|
'museum',
|
||||||
|
'name',
|
||||||
|
'net',
|
||||||
|
'org',
|
||||||
|
'pro',
|
||||||
|
'tel',
|
||||||
|
'travel',
|
||||||
|
]);
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
text: string;
|
text: string;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue