From d09cc090716b5ee2c0ea6971aca4d3c3f46e003a Mon Sep 17 00:00:00 2001 From: Clarence Chan Date: Tue, 28 Jan 2025 17:58:57 -0500 Subject: [PATCH] Fix weightclass not in short form --- src/index.ts | 3 ++- src/scrape.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index e400454f..6af7a564 100644 --- a/src/index.ts +++ b/src/index.ts @@ -65,7 +65,8 @@ function formatEventForCalendar(event: UFCEvent) { } description += `\n--------------------\n${event.earlyPrelims.join("\n")}\n`; } - description += `\n${event.url}`; + if (description.length) description += "\n"; + description += `${event.url}`; // Get current date and time to communicate to the user how up-to-date // the event details are diff --git a/src/scrape.ts b/src/scrape.ts index 9893327f..8bd31562 100644 --- a/src/scrape.ts +++ b/src/scrape.ts @@ -99,7 +99,7 @@ function convertLiToStr(li: HTMLElement) { const redRankStr = ranks[0] ? ` (${ranks[0]})` : ""; const blueRankStr = ranks[1] ? ` (${ranks[1]})` : ""; - fightStr += `• ${red}${redRankStr} vs. ${blue}${blueRankStr} @${bout}`; + fightStr += `• ${red}${redRankStr} vs. ${blue}${blueRankStr} @${weightClass}`; // Deentitize HTML entities fightStr = decode(fightStr);