diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-11-16 16:06:21 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-11-16 16:06:21 +0300 |
commit | 705cfc1d496f96875da5c13209f0b78803183843 (patch) | |
tree | d4b59fb6f313a514c6a685ab34722e8f74e4ae0c /telegram/formatter/formatter.go | |
parent | dcb802358b8f7d8a72da04cce71b2dcc0f6a2fbc (diff) |
gofmt
Diffstat (limited to 'telegram/formatter/formatter.go')
-rw-r--r-- | telegram/formatter/formatter.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/telegram/formatter/formatter.go b/telegram/formatter/formatter.go index 9403198..6da8256 100644 --- a/telegram/formatter/formatter.go +++ b/telegram/formatter/formatter.go @@ -9,6 +9,7 @@ import ( ) type insertionType int + const ( insertionOpening insertionType = iota insertionClosing @@ -16,6 +17,7 @@ const ( ) type MarkupModeType int + const ( MarkupModeXEP0393 MarkupModeType = iota MarkupModeMarkdown @@ -216,7 +218,7 @@ func quotePrependNewlines(entity *client.TextEntity, doubledRunes []rune, markup isNewline := doubledRunes[i] == newlineCode if (isNewline && markupMode == MarkupModeXEP0393) || (wasNewline && isNewline && markupMode == MarkupModeMarkdown) { insertions = append(insertions, &insertion{ - Offset: i+1, + Offset: i + 1, Runes: quoteRunes, Type: insertionUnpaired, }) @@ -388,7 +390,7 @@ func Format( if ins1.Offset == ins2.Offset { if ins2.Type == insertionOpening { // > ** return true - } else if ins2.Type == insertionClosing { // **> + } else if ins2.Type == insertionClosing { // **> return false } } else { @@ -399,7 +401,7 @@ func Format( if ins1.Offset == ins2.Offset { if ins1.Type == insertionOpening { // > ** return false - } else if ins1.Type == insertionClosing { // **> + } else if ins1.Type == insertionClosing { // **> return true } } else { |