summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
Diffstat (limited to 'assets')
-rw-r--r--assets/client.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/assets/client.js b/assets/client.js
index a6a2a73..e50ea9d 100644
--- a/assets/client.js
+++ b/assets/client.js
@@ -89,7 +89,15 @@ function connect() {
function acceptBoard(data) {
let vals = new Uint8Array(data);
- board = Array.from(vals).reduce((s,c) => s + String.fromCodePoint(c), "");
+ board = Array.from(vals).reduce((s,c) => {
+ let v = String.fromCodePoint(c);
+ if (v == ' ') {
+ s = s + "&nbsp";
+ } else {
+ s = s + v;
+ }
+ return s;
+ }, "");
let last = board[0];
let last_idx = 0;
let split_board = [];