glow/formatting.go
2020-10-05 13:54:01 +02:00

15 lines
261 B
Go

package main
import (
"github.com/muesli/reflow/indent"
"github.com/muesli/reflow/wordwrap"
)
const (
wrapAt = 78
indentAmount = 2
)
func formatBlock(s string) string {
return indent.String(wordwrap.String(s, wrapAt-indentAmount), indentAmount)
}