mirror of
https://github.com/charmbracelet/glow
synced 2024-12-14 06:02:27 +00:00
16 lines
261 B
Go
16 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)
|
||
|
}
|