Fix MOTD trimming

This commit is contained in:
Pavel Djundik 2018-07-16 22:05:55 +03:00 committed by Pavel Djundik
parent 0ba6200bb7
commit 987f48ae13

View File

@ -26,7 +26,10 @@ export default {
} }
// Remove empty lines around the MOTD (but not within it) // Remove empty lines around the MOTD (but not within it)
return lines.join("\n").trim(); return lines
.map((line) => line.trimEnd())
.join("\n")
.replace(/^[\r\n]+|[\r\n]+$/g, "");
}, },
}, },
}; };