Fix MOTD display to actually only trim new lines
This commit is contained in:
parent
056a38caeb
commit
5209b12d44
@ -112,7 +112,10 @@ function buildChatMessage(msg) {
|
||||
}
|
||||
|
||||
// Remove empty lines around the MOTD (but not within it)
|
||||
msg.text = lines.join("\n").trim();
|
||||
msg.text = lines
|
||||
.map((line) => line.trimEnd())
|
||||
.join("\n")
|
||||
.replace(/^[\r\n]+|[\r\n]+$/g, "");
|
||||
}
|
||||
|
||||
const renderedMessage = $(templates[template](msg));
|
||||
|
Loading…
Reference in New Issue
Block a user