From 852d9e680d51d08e9bd6f777206db136223285aa Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Fri, 7 Aug 2020 14:42:22 +0200 Subject: [PATCH] improve pasteRule for links, allow uppercase domains --- packages/tiptap-extensions/src/marks/Link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tiptap-extensions/src/marks/Link.js b/packages/tiptap-extensions/src/marks/Link.js index 774705e08..4e8f1cf0c 100644 --- a/packages/tiptap-extensions/src/marks/Link.js +++ b/packages/tiptap-extensions/src/marks/Link.js @@ -56,7 +56,7 @@ export default class Link extends Mark { pasteRules({ type }) { return [ pasteRule( - /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g, + /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/gi, type, url => ({ href: url }), ),