Skip to content

Commit

Permalink
Support private pens
Browse files Browse the repository at this point in the history
  • Loading branch information
workeffortwaste committed Feb 18, 2022
1 parent 9a2c650 commit ecc8a90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit ecc8a90

Please sign in to comment.