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' } 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' }