From 86cbbcb8bd3c62f0e1af0188cf7fb83cb89df6c4 Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Fri, 1 Apr 2022 12:35:54 -0400 Subject: gofmt --- telegram/formatter/formatter.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'telegram/formatter') diff --git a/telegram/formatter/formatter.go b/telegram/formatter/formatter.go index 4d37be1..740fa09 100644 --- a/telegram/formatter/formatter.go +++ b/telegram/formatter/formatter.go @@ -140,20 +140,20 @@ func ClaspDirectives(text string, entities []*client.TextEntity) []*client.TextE endOffset := entity.Offset + entity.Length if unicode.IsSpace(doubledRunes[entity.Offset]) { - for j, r := range doubledRunes[entity.Offset+1:endOffset] { + for j, r := range doubledRunes[entity.Offset+1 : endOffset] { if !unicode.IsSpace(r) { dirty = true - entity.Offset += int32(j+1) - entity.Length -= int32(j+1) + entity.Offset += int32(j + 1) + entity.Length -= int32(j + 1) break } } } if unicode.IsSpace(doubledRunes[endOffset-1]) { - for j := endOffset-2; j >= entity.Offset; j-- { + for j := endOffset - 2; j >= entity.Offset; j-- { if !unicode.IsSpace(doubledRunes[j]) { dirty = true - entity.Length = j+1-entity.Offset + entity.Length = j + 1 - entity.Offset break } } -- cgit v1.2.3