From 6e29499b1d0cdb6015602ad4c4116f5b5063c0a8 Mon Sep 17 00:00:00 2001 From: Shagnor Date: Thu, 29 Dec 2022 00:36:28 +1100 Subject: [PATCH] Don't require carriage returns. --- assets/game.html | 1 - src/index.ts | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/game.html b/assets/game.html index 8afd00d..08806d9 100644 --- a/assets/game.html +++ b/assets/game.html @@ -16,7 +16,6 @@ } -
diff --git a/src/index.ts b/src/index.ts index a181073..871867b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -44,7 +44,8 @@ function connectTerm() { }); webSocket.addEventListener('message', (msg) => { fit.fit(); - term.write(msg.data); + term.write(msg.data.replaceAll("\r", "") + .replaceAll("\n", "\r\n")); }); }