From b4228ab1772a177a00dc76a525e102832d481135 Mon Sep 17 00:00:00 2001
From: Pyro Nicampt <81565698+PyroNicampt@users.noreply.github.com>
Date: Sun, 20 Apr 2025 18:36:19 -0500
Subject: [PATCH] Fix changelog newline handling
---
legend.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/legend.js b/legend.js
index 1063cab..93d4fe8 100644
--- a/legend.js
+++ b/legend.js
@@ -278,7 +278,7 @@ async function setLastUpdateData(){
};
let updateDate = new Date(commits[0].commit.author.date);
lastUpdateElement.innerHTML = `${Utils.formattedTimeBetweenDates(new Date(), updateDate)} ${new Date() >= updateDate ? 'ago' : 'from now'}`;
- document.getElementById('changelog').innerHTML = commits[0].commit.message.replace('\n','
');
+ document.getElementById('changelog').innerHTML = commits[0].commit.message.replaceAll(/\n+/g, '\n').replaceAll('\n','
');
if(pageLoadUpdateDate == null){
pageLoadUpdateDate = updateDate;
}else{