Remove alternative Markdown renderer build options (Glamour performance issues addressed in custom fork; other options need more work)

This commit is contained in:
2025-06-19 14:55:29 -04:00
parent d2b2dcf7cf
commit 52628dba0a
12 changed files with 22 additions and 82 deletions
+8 -2
View File
@@ -3,7 +3,9 @@ package cli
import (
"fmt"
"os"
"strings"
"github.com/charmbracelet/glamour"
"github.com/rwinkhart/go-boilerplate/back"
"github.com/rwinkhart/go-boilerplate/other"
"github.com/rwinkhart/libmutton/crypt"
@@ -58,8 +60,12 @@ fieldLoop:
noteLines = append(noteLines, decryptedEntry[field])
}
// print notes to stdout
renderNote(noteLines)
// render notes as Markdown
r, _ := glamour.NewTermRenderer(glamour.WithStylesFromJSONBytes(glamourStyle()), glamour.WithPreservedNewLines(), glamour.WithWordWrap(width))
markdownNotesString, _ := r.Render(strings.Join(noteLines, "\n"))
// print the rendered Markdown notes
fmt.Print(markdownNotesString)
// break after notes have been printed
break fieldLoop