mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-08-29 05:16:25 -04:00
23 lines
330 B
Go
23 lines
330 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/charmbracelet/glamour"
|
|
)
|
|
|
|
func main() {
|
|
in := `# Custom Renderer
|
|
|
|
Word-wrapping will occur when lines exceed the limit of 40 characters.
|
|
`
|
|
|
|
r, _ := glamour.NewTermRenderer(
|
|
glamour.WithStandardStyle("dark"),
|
|
glamour.WithWordWrap(40),
|
|
)
|
|
|
|
out, _ := r.Render(in)
|
|
fmt.Print(out)
|
|
}
|