Skip to content

Commit

Permalink
shaping: clarify truncator behavior more in docs
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Waldon <[email protected]>
  • Loading branch information
whereswaldon committed Feb 20, 2025
1 parent 8edf2f2 commit 218746d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shaping/wrapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -973,9 +973,10 @@ func (l *LineWrapper) postProcessLine(finalLine Line, done bool) (WrappedLine, b
// is non-zero, the final line of text returned by successive calls to WrapNextLine
// may be truncated. The quantity of runes truncated by wrapping the line is
// returned in [WrappedLine].Truncated. If this is non-zero AND the LineWrapper's
// [WrapConfig].Truncator is set, the final run of the truncated will be a copy
// [WrapConfig].Truncator is set, the final [Output] of the truncated line will be a copy
// of the Truncator with its Runes.Count set to the quantity of runes truncated during
// line wrapping.
// line wrapping. The sum of all [Output].Runes.Count in the line will the number of runes
// provided as input to the line wrapping process.
func (l *LineWrapper) WrapNextLine(maxWidth int) (out WrappedLine, done bool) {
// If we've already finished the paragraph, don't do any more work.
if !l.more {
Expand Down

0 comments on commit 218746d

Please sign in to comment.