From b0c9c583028bb4d3cfeea461cce3d28bcb4f2017 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Tue, 10 Dec 2024 21:27:13 -0300 Subject: [PATCH] fix(stdin): trim space instead of \n (#761) we were trimming an ending \n, but it would then break a \r\n sequence, causing misrenders. this fixes it closes #682 Signed-off-by: Carlos Alexandro Becker --- internal/stdin/stdin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/stdin/stdin.go b/internal/stdin/stdin.go index d9466628e..a5cebdb51 100644 --- a/internal/stdin/stdin.go +++ b/internal/stdin/stdin.go @@ -30,7 +30,7 @@ func Read() (string, error) { } } - return strings.TrimSuffix(b.String(), "\n"), nil + return strings.TrimSpace(b.String()), nil } // ReadStrip reads input from an stdin pipe and strips ansi sequences.