From 06047f8983a4693de4ec8f6dc154341493a9a6d4 Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Tue, 18 Mar 2025 23:05:56 +1100
Subject: updates: fix news

---
 src/modules/popdowns/updates.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/modules/popdowns/updates.tsx')

diff --git a/src/modules/popdowns/updates.tsx b/src/modules/popdowns/updates.tsx
index 0cf7d1f..4cb95e7 100644
--- a/src/modules/popdowns/updates.tsx
+++ b/src/modules/popdowns/updates.tsx
@@ -75,8 +75,9 @@ const News = ({ news }: { news: string }) => {
     const expanded = Variable(true);
 
     news = news
-        .replaceAll("\n\n\x1b", "\n\n") // Remove unopened \x1b[0m after each piece of news
         .replace(/^([0-9]{4}-[0-9]{2}-[0-9]{2} .+)$/gm, "<b>$1</b>") // Make titles bold
+        .replaceAll("\n\x1b[0m\n<b>", "\n\n<b>") // Remove unopened \x1b[0m after each piece of news
+        .slice(0, -5) // Remove last unopened \x1b[0m
         .replaceAll("\x1b[0m", "</span>"); // Replace reset code with end span
 
     return (
-- 
cgit v1.2.3-freya

