From aebd335c7c5f48d339aa8c8b9da8ef2f57844c1e Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Sat, 11 Nov 2023 22:27:14 +0000 Subject: [PATCH] Update log.service.ts --- ui/src/app/core/log.service.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ui/src/app/core/log.service.ts b/ui/src/app/core/log.service.ts index 1f63e3c64..fa76515bd 100644 --- a/ui/src/app/core/log.service.ts +++ b/ui/src/app/core/log.service.ts @@ -82,20 +82,22 @@ export class LogService { this.io.socket.on('stdout', (data: string) => { console.log(data); if (this.pluginName) { - const lines = data.split('\n'); + const lines = data.split('\r\n'); let includeNextLine = false; lines.forEach((line) => { + this.term.write(line + '\r'); if (includeNextLine) { - if (line.match(/\\u001b\[39m\\u001b\[36m\[(.*?)]\\u001b\[39m/)) { + if (line.match(/ \u001b\[39m\u001b\[36m\[.*?]\u001b\[39m /)) { includeNextLine = false; } else { - this.term.write(line); + this.term.write(line + '\r'); return; } } - if (line.includes(` \u001b[39m\u001b[36m[${this.pluginName}]\u00b1[39m `)) { + // " \u001b[39m\u001b[36m[Govee]\u001b[39m " + if (line.includes(` \u001b[39m\u001b[36m[${this.pluginName}]\u001b[39m `)) { this.term.write(line + '\r'); includeNextLine = true; }