From ceb7d49c06c309ffce31f1512b415e8875f82e75 Mon Sep 17 00:00:00 2001 From: Andrea Vos Date: Wed, 20 Mar 2024 18:36:05 +0100 Subject: [PATCH] fix smoke tests --- server/calendarBot.js | 3 +++ src/parseMarkdown.js | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/server/calendarBot.js b/server/calendarBot.js index 51d717339..388a8fb17 100644 --- a/server/calendarBot.js +++ b/server/calendarBot.js @@ -97,6 +97,9 @@ const lastPostId = {}; } catch {} for (const publisher of process.argv[3].split(',')) { + if (!publisher) { + continue; + } console.log(`Publishing: ${publisher}`); const postId = await publishers[publisher]( message, diff --git a/src/parseMarkdown.js b/src/parseMarkdown.js index 68336fb24..d523d8e40 100644 --- a/src/parseMarkdown.js +++ b/src/parseMarkdown.js @@ -101,10 +101,12 @@ const generateGallery = (_, itemsString) => { const items = JSON.parse(`{${itemsString.replace(/"/g, '"').replace(/,\s*$/, '')}}`); const label = (alt) => { - if (!alt.startsWith('! ')) { return ''; } + if (!alt.startsWith('! ')) { + return ''; + } return `

${alt.substring(2)}

`; - } + }; const cells = Object.entries(items).map(([src, alt]) => `