okami.mom/glamour

git clone https://git.nkp.pet/okami.mom/glamour

Ayman BagabasMerge pull request #408 from charmbracelet/v2-expcf874d7

main
319 B22 linesraw
1package main
2
3import (
4	"fmt"
5
6	"charm.land/glamour/v2"
7)
8
9func main() {
10	in := `# Custom Renderer
11
12Word-wrapping will occur when lines exceed the limit of 40 characters.
13`
14
15	r, _ := glamour.NewTermRenderer(
16		glamour.WithStandardStyle("dark"),
17		glamour.WithWordWrap(40),
18	)
19
20	out, _ := r.Render(in)
21	fmt.Print(out)
22}