replace newlines with space

This commit is contained in:
derpystuff 2023-12-15 18:03:38 +01:00
parent 699327266b
commit 102d895697

View file

@ -30,7 +30,7 @@ module.exports.timestamp = function(time, flag = "t"){
} }
module.exports.stringwrap = function(content = "", length, newlines = true){ module.exports.stringwrap = function(content = "", length, newlines = true){
if(!newlines) content = content.replace(/\n/, '') if(!newlines) content = content.replace(/\n/, ' ')
if(content.length > length) return content.substr(0, length) + '...'; if(content.length > length) return content.substr(0, length) + '...';
return content; return content;
} }