diff --git a/src/cli/edit.go b/src/cli/edit.go index a9e46c4..48060a2 100644 --- a/src/cli/edit.go +++ b/src/cli/edit.go @@ -138,6 +138,6 @@ func editNote(baseNote []string) ([]string, bool) { if !reflect.DeepEqual(offline.RemoveTrailingEmptyStrings(note), baseNote) { return note, true } else { - return note, false + return []string{}, false } } diff --git a/src/cli/entryReader.go b/src/cli/entryReader.go index c4ca6d6..57bd91a 100644 --- a/src/cli/entryReader.go +++ b/src/cli/entryReader.go @@ -46,7 +46,7 @@ func EntryReader(decryptedEntry []string, hidePassword bool, sync bool) { for field := 3; field < len(decryptedEntry); field++ { markdownNotes = append(markdownNotes, decryptedEntry[field]) } - r, _ := glamour.NewTermRenderer(glamour.WithStylesFromJSONBytes(glamourStyle())) + r, _ := glamour.NewTermRenderer(glamour.WithStylesFromJSONBytes(glamourStyle()), glamour.WithPreservedNewLines()) markdownNotesString, _ := r.Render(strings.Join(markdownNotes, "\n")) // print markdown-rendered notes diff --git a/src/offline/gpg.go b/src/offline/gpg.go index 26ba3bd..d01b944 100644 --- a/src/offline/gpg.go +++ b/src/offline/gpg.go @@ -19,9 +19,6 @@ func DecryptGPG(targetLocation string) []string { os.Exit(1) } outputSlice := strings.Split(string(output), "\n") - for i, lineData := range outputSlice { - outputSlice[i] = strings.TrimRight(lineData, " \t") // remove trailing whitespace - } return outputSlice }