Merge pull request #2657 from MiniDigger/patch-1

use replace over trimEnd to support ff60
This commit is contained in:
Pavel Djundik 2018-07-17 16:37:10 +03:00 committed by GitHub
commit 482bdf51f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,7 @@ function buildChatMessage(msg) {
// Remove empty lines around the MOTD (but not within it) // Remove empty lines around the MOTD (but not within it)
msg.text = lines msg.text = lines
.map((line) => line.trimEnd()) .map((line) => line.replace(/\s*$/, ""))
.join("\n") .join("\n")
.replace(/^[\r\n]+|[\r\n]+$/g, ""); .replace(/^[\r\n]+|[\r\n]+$/g, "");
} }