From ecc8a903bc26608e8c43f02bb324522220c320b8 Mon Sep 17 00:00:00 2001 From: Chris Johnson <49479599+workeffortwaste@users.noreply.github.com> Date: Fri, 18 Feb 2022 11:14:15 +0000 Subject: [PATCH] Support private pens --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 280f65e..4600fc7 100644 --- a/index.js +++ b/index.js @@ -244,7 +244,7 @@ const urlHelper = (url) => { /* If a standard pen url is found convert it to an URL that works with this tool */ if (url.includes('//codepen.io/')) { /* Use regex groups to reformat the URL */ - const regex = /\/\/codepen.io\/(.*?)\/pen\/(.*?)(?:\/|\?|$)/g + const regex = /\/\/codepen.io\/(.*?)\/pen\/(.*?)$/g const [match,, id] = regex.exec(url) /* Return the debug codepen url if a match is found */