diff --git a/deploy.ts b/deploy.ts index 68746507a..2785ff48f 100644 --- a/deploy.ts +++ b/deploy.ts @@ -281,12 +281,20 @@ function generateRssFeed() { const showdownConverter = new showdown.Converter(); + const markdownToHtml = (markdown: string) => { + // Showdown doesn't support trailing backslashes as newlines. Use double + // spaces instead. https://github.com/showdownjs/showdown/issues/394 + markdown = markdown.replace(/\\\n/g, ' \n'); + + return showdownConverter.makeHtml(markdown); + } + for (const feedItem of feedItems) { feed.addItem({ title: feedItem.title, id: feedItem.url + '#' + feedItem.commit, link: feedItem.url, - content: showdownConverter.makeHtml(feedItem.content), + content: markdownToHtml(feedItem.content), date: feedItem.date, }); } @@ -295,6 +303,9 @@ function generateRssFeed() { } async function main() { + fs.writeFileSync('updates.atom', generateRssFeed()); + return; + const catalog = await generateModCatalog(); fs.writeFileSync('catalog.json', JSONstringifyOrder(catalog, 4));