From 3b922d82af8421423f5832fd8b27e08c09942761 Mon Sep 17 00:00:00 2001 From: Eli Silverman Date: Tue, 6 Oct 2020 23:11:58 -0700 Subject: [PATCH 1/2] Update linkify.js Allow commas in links --- src/rules/linkify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rules/linkify.js b/src/rules/linkify.js index 1686db6..376f3d7 100644 --- a/src/rules/linkify.js +++ b/src/rules/linkify.js @@ -1,4 +1,4 @@ -const LINK_REGEX = /(^|\s|>)((?:http(?:s)?:\/\/.)(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6})\b([-a-zA-Z0-9@:;%_\+.~#?!&//=]*)/g +const LINK_REGEX = /(^|\s|>)((?:http(?:s)?:\/\/.)(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6})\b([-a-zA-Z0-9@:;%_\+.,~#?!&//=]*)/g export class Linkify { static get RULE_NAME () { return 'linkify' } From cc37ddfe51ea2ee6fd4439879c7671dcaaa302b6 Mon Sep 17 00:00:00 2001 From: Eli Silverman Date: Tue, 6 Oct 2020 23:12:55 -0700 Subject: [PATCH 2/2] Update link.js Allow comma in links --- src/rules/link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rules/link.js b/src/rules/link.js index 696d1e0..1851371 100644 --- a/src/rules/link.js +++ b/src/rules/link.js @@ -1,4 +1,4 @@ -const LINK_REGEX = /\[(.+?)\]\(((?:(?:http[s]?|ftp):\/{2})?)([\w\/\-+?#=.:;!%&]+)\)/g +const LINK_REGEX = /\[(.+?)\]\(((?:(?:http[s]?|ftp):\/{2})?)([\w\/\-+?#=.,:;!%&]+)\)/g export class Link { static get RULE_NAME () { return 'link' }