mirror of
https://github.com/charmbracelet/gum
synced 2026-03-14 13:45:45 +01:00
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 <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
8d611cb7df
commit
b0c9c58302
1 changed files with 1 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue