mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-09-04 08:07:16 -04:00
Build default Glamour style into binary
This commit is contained in:
@@ -46,7 +46,7 @@ func EntryReader(decryptedEntry []string, hidePassword bool, sync bool) {
|
|||||||
for field := 3; field < len(decryptedEntry); field++ {
|
for field := 3; field < len(decryptedEntry); field++ {
|
||||||
markdownNotes = append(markdownNotes, decryptedEntry[field])
|
markdownNotes = append(markdownNotes, decryptedEntry[field])
|
||||||
}
|
}
|
||||||
r, _ := glamour.NewTermRenderer(glamour.WithStylePath("glamour-styles/gruvbox.json"))
|
r, _ := glamour.NewTermRenderer(glamour.WithStylesFromJSONBytes(glamourStyle()))
|
||||||
markdownNotesString, _ := r.Render(strings.Join(markdownNotes, "\n"))
|
markdownNotesString, _ := r.Render(strings.Join(markdownNotes, "\n"))
|
||||||
|
|
||||||
// print markdown-rendered notes
|
// print markdown-rendered notes
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
{
|
package cli
|
||||||
|
|
||||||
|
func glamourStyle() []byte {
|
||||||
|
return []byte(`{
|
||||||
"document": {
|
"document": {
|
||||||
"block_prefix": "\n",
|
"block_prefix": "\n",
|
||||||
"block_suffix": "\n",
|
"block_suffix": "\n",
|
||||||
@@ -194,3 +197,5 @@
|
|||||||
"html_block": {},
|
"html_block": {},
|
||||||
"html_span": {}
|
"html_span": {}
|
||||||
}
|
}
|
||||||
|
`)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user