Fix changelog newline handling
This commit is contained in:
1 parent
6f72d24ad1
commit
b4228ab177
1 file changed
+1
-1
@@ -278,7 +278,7 @@ async function setLastUpdateData(){
|
|||||||
};
|
};
|
||||||
let updateDate = new Date(commits[0].commit.author.date);
|
let updateDate = new Date(commits[0].commit.author.date);
|
||||||
lastUpdateElement.innerHTML = `<a href="https://github.com/PyroNicampt/DV-Community-Map/commits/main/" title="${updateDate.toString()}">${Utils.formattedTimeBetweenDates(new Date(), updateDate)} ${new Date() >= updateDate ? 'ago' : 'from now'}</a>`;
|
lastUpdateElement.innerHTML = `<a href="https://github.com/PyroNicampt/DV-Community-Map/commits/main/" title="${updateDate.toString()}">${Utils.formattedTimeBetweenDates(new Date(), updateDate)} ${new Date() >= updateDate ? 'ago' : 'from now'}</a>`;
|
||||||
document.getElementById('changelog').innerHTML = commits[0].commit.message.replace('\n','<br>');
|
document.getElementById('changelog').innerHTML = commits[0].commit.message.replaceAll(/\n+/g, '\n').replaceAll('\n','<br>');
|
||||||
if(pageLoadUpdateDate == null){
|
if(pageLoadUpdateDate == null){
|
||||||
pageLoadUpdateDate = updateDate;
|
pageLoadUpdateDate = updateDate;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in new issue
Block a user