mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-05-18 20:33:28 +02:00
proper whitespace regex
This commit is contained in:
@@ -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(' ', ' ')+'</span>';
|
||||
return '<span class="color-'+color+'">'+msg.replace(/ /g, ' ')+'</span>';
|
||||
});
|
||||
|
||||
// send line back to the client
|
||||
|
||||
Reference in New Issue
Block a user