mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 11:09:17 -07:00
Correct logic where we add a space after the prefix when logging
This commit is contained in:
@@ -29,7 +29,7 @@ func LogToFile(path string, prefix string) (*os.File, error) {
|
||||
// doesn't already have a trailing space.
|
||||
if len(prefix) > 0 {
|
||||
finalChar := prefix[len(prefix)-1]
|
||||
if unicode.IsSpace(rune(finalChar)) {
|
||||
if !unicode.IsSpace(rune(finalChar)) {
|
||||
prefix += " "
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user