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