Don't require carriage returns.

This commit is contained in:
Condorra 2022-12-29 00:36:28 +11:00
parent d7d6f0503b
commit 6e29499b1d
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,6 @@
}
</style>
<link rel="stylesheet" href="xterm.css" />
<script src="xterm.js"></script>
</head>
<body style="background: black; height: 100%">
<div style="background: black; color: white; display: flex; flex-direction: column; margin: 0px; height: 100%; width: 100%">

View File

@ -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"));
});
}