Compare commits

..

No commits in common. "5487903b27e111361c2480f21e96ab38a1542dfb" and "135fb372f5b2751e697a1817a0043486bf356c7c" have entirely different histories.

3 changed files with 4 additions and 6 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "ripunzel",
"version": "1.27.3",
"version": "1.27.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ripunzel",
"version": "1.27.3",
"version": "1.27.2",
"license": "ISC",
"dependencies": {
"array.prototype.flatten": "^1.2.1",

View File

@ -1,6 +1,6 @@
{
"name": "ripunzel",
"version": "1.27.3",
"version": "1.27.2",
"description": "Web content archiving tool, with versatile filename patterns and extensive options for reddit user profiles.",
"main": "app.js",
"scripts": {

View File

@ -118,9 +118,7 @@ module.exports = function dissectLink(url) {
return acc;
}
// const match = host.pattern.match(url.replace(/(https?:\/\/)|(\/)+/g, '$1$2')); // remove double slashes
const { origin, pathname } = new URL(url);
const match = host.pattern.match(`${origin}${pathname}`); // remove double slashes
const match = host.pattern.match(url.replace(/(https?:\/\/)|(\/)+/g, '$1$2')); // remove double slashes
if (match) {
return Object.assign(match, {