proper whitespace regex

This commit is contained in:
AlexKvazos
2015-04-29 12:56:55 -05:00
parent 1708df5bb4
commit 95ce3d15ae
+1 -1
View File
@@ -85,7 +85,7 @@ module.exports = function(socket) {
// format the buffer with the correct coloring
buffer = buffer.replace(/§([0-9abcdef])([^§]*)/ig, function replace(regex, color, msg) {
return '<span class="color-'+color+'">'+msg.replace(' ', '&nbsp;')+'</span>';
return '<span class="color-'+color+'">'+msg.replace(/ /g, '&nbsp;')+'</span>';
});
// send line back to the client