From ef2331132d167b13b946fa3792d803818d0c148b Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Thu, 15 Jul 2021 21:50:39 +0300 Subject: [PATCH] Support links with long TLDs (#1284) --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index a998fb9ef..8e2fa9cd9 100644 --- a/src/config.ts +++ b/src/config.ts @@ -123,7 +123,7 @@ export const CONTENT_TYPES_FOR_QUICK_UPLOAD = new Set([ ]); // eslint-disable-next-line max-len -export const RE_LINK_TEMPLATE = '((ftp|https?):\\/\\/)?((www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6})\\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)'; +export const RE_LINK_TEMPLATE = '((ftp|https?):\\/\\/)?((www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,63})\\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)'; export const RE_MENTION_TEMPLATE = '(@[\\w\\d_-]+)'; export const RE_TME_LINK = /^(?:https?:\/\/)?(?:t\.me\/)([\d\w_]+)(?:\/([\d]+))?$/gm; export const RE_TME_INVITE_LINK = /^(?:https?:\/\/)?(?:t\.me\/joinchat\/)([\d\w_-]+)?$/gm;