wrap icon indicating copy to clipboard operation
wrap copied to clipboard

📖⏎ An efficient and flexible word-wrapping package for Go (golang)

Results 4 wrap issues
Sort by recently updated
recently updated
newest added

In the [hyphen example](https://pkg.go.dev/github.com/bbrks/wrap/v2#example-Wrapper.Wrap-Hyphens), the hyphenated word "bad-tempered" is rendered across lines (as appropriate), but is rendered as two words rather than a broken hyphenated word, "bad-\ntempered".

Use case : using `bbrks/wrap` with email headers (https://tools.ietf.org/html/rfc2822#section-2.2.3) i.e. ability to add a whitespace only to line numbers >=2, leaving first line untouched.

wrap uses a greedy algorithm for breaking lines which can produce visually unappealing results. We can improve this by providing a way of enabling minimum raggedness which uses an alternative...

enhancement
help wanted

I was having trouble with the handling of tabs in `OutputLinePrefix`. This patch adds a `TabWidth` option which defaults to 8. ``` // TabWidth sets the perceived size of a...