Skip to content

Commit

Permalink
feat(pkg/doc): wrap terminal output after 80 instead of 120 characters
Browse files Browse the repository at this point in the history
Fixes #169.
  • Loading branch information
lukasmalkmus committed Sep 7, 2023
1 parent 0bb9c26 commit 33b182e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/doc/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ func String(s string) string {
return unwrap(r)
}

// Wrap is like Doc() but word wraps at the given width but at max 120
// Wrap is like Doc() but word wraps at the given width but at max 80
// characters.
func Wrap(s string, wrap int) string {
if wrap > 120 {
wrap = 120
if wrap > 80 {
wrap = 80
}
s = String(s)
return wordwrap.String(s, wrap)
Expand Down

0 comments on commit 33b182e

Please sign in to comment.