glow/formatting.go

16 lines
261 B
Go
Raw Normal View History

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)
}