From dfdd91443fd8341c8e58cca1d17916e7a0109d67 Mon Sep 17 00:00:00 2001 From: ChiefORZ Date: Tue, 1 Mar 2022 11:32:25 +0100 Subject: [PATCH] fix: url regExp was not picked up --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 6acacff..0d5507e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,7 +14,7 @@ import report from 'puppeteer-report'; import util from 'util'; const urlRegExp = new RegExp( - /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/ + /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)/ ); const debug = Debug('pdf-generator');