Wrap markdown text at full terminal width

This commit is contained in:
2024-04-05 18:48:48 -04:00
parent 34a01f3688
commit 13352ec2b4
+1 -1
View File
@@ -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()), glamour.WithPreservedNewLines())
r, _ := glamour.NewTermRenderer(glamour.WithStylesFromJSONBytes(glamourStyle()), glamour.WithPreservedNewLines(), glamour.WithWordWrap(width))
markdownNotesString, _ := r.Render(strings.Join(markdownNotes, "\n"))
// print markdown-rendered notes