mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00:00
15 lines
261 B
Go
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)
|
|
}
|