Skip to content

Commit

Permalink
Add markdown links parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
fuksman committed Dec 22, 2023
1 parent 5713569 commit 26cb01e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/prepare-experience.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var regex = /https:\/\/github.com\/.*\/.*\/.*\/.*\.zip/g;
const zipLink = issueExperience.match(regex)[0];

if (!zipLink) {
throw new Error(`Experience with name ${name} has no link to zip archive`);
throw new Error(`Experience has no link to zip archive`);
}

(async () => {
Expand All @@ -50,11 +50,13 @@ const prodDownloadLink = "https://storage.gallery.any.coop/" + name + "/" + name

var regex = /src\s*=\s*"(.+?)"/g;
const extension = "png";
const screenshotLinks = issueScreenshot.match(regex);
var screenshotLinks = issueScreenshot.match(regex);
const screenshotsDir = `${dir}/screenshots`;

if (!screenshotLinks) {
throw new Error(`Experience with name ${name} has no screenshots`);
var regex = /\((.*?)\)/g;
screenshotLinks = issueScreenshot.match(regex);
screenshotLinks = screenshotLinks.map(link => link.replace(/\(|\)/g, ''));
}

var testScreenshotLinks = [];
Expand Down

0 comments on commit 26cb01e

Please sign in to comment.