minor fix

This commit is contained in:
SnskArora 2025-03-22 18:39:52 +05:30
parent b6ce1f8b29
commit f492e2cd84
No known key found for this signature in database
GPG key ID: 6EC7FEA48093AB59

View file

@ -289,11 +289,11 @@ func splitLongString(input string, maxLength int) []string {
currentLength := 0
for i, line := range lines {
lineLength := len(line)
if i < len(lines)-1 {
lineLength++
}
lineLength := len(line)
if currentLength+lineLength > maxLength {
if currentChunk.Len() > 0 {
result = append(result, currentChunk.String())