From 6c5052ed8483860fa50aa408095e4f6f253a8a3f Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Tue, 24 Nov 2020 00:22:56 +0100 Subject: [PATCH] Prevent printing empty lines in output --- app/assets/javascripts/editor/evaluation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/editor/evaluation.js b/app/assets/javascripts/editor/evaluation.js index cc09a16f..af06c4c2 100644 --- a/app/assets/javascripts/editor/evaluation.js +++ b/app/assets/javascripts/editor/evaluation.js @@ -154,7 +154,7 @@ CodeOceanEditorEvaluation = { }, printWebsocketOutput: function (msg) { - if (!msg.data) { + if (!msg.data || msg.data === "\r") { return; } msg.data = msg.data.replace(/(\r)/gm, "\n");