From d7028cfbefa257c753bb3087ac2d9454ba516c3f Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Fri, 21 Jun 2024 10:13:59 +0200 Subject: [PATCH] Fix newlines in logs (#3808) --- web/src/components/repo/pipeline/PipelineLog.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/components/repo/pipeline/PipelineLog.vue b/web/src/components/repo/pipeline/PipelineLog.vue index 6fa42fc79..4636f2f48 100644 --- a/web/src/components/repo/pipeline/PipelineLog.vue +++ b/web/src/components/repo/pipeline/PipelineLog.vue @@ -184,7 +184,7 @@ function writeLog(line: Partial) { logBuffer.value.push({ index: line.index ?? 0, number: (line.index ?? 0) + 1, - text: ansiUp.value.ansi_to_html(decode(line.text ?? '')), + text: ansiUp.value.ansi_to_html(`${decode(line.text ?? '')}\n`), time: line.time ?? 0, type: null, // TODO: implement way to detect errors and warnings }); @@ -254,7 +254,7 @@ async function download() { downloadInProgress.value = false; } const fileURL = window.URL.createObjectURL( - new Blob([logs.map((line) => decode(line.data)).join('')], { + new Blob([logs.map((line) => decode(line.data ?? '')).join('\n')], { type: 'text/plain', }), );