gofmt
This commit is contained in:
parent
dcb802358b
commit
705cfc1d49
|
@ -9,6 +9,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type insertionType int
|
type insertionType int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
insertionOpening insertionType = iota
|
insertionOpening insertionType = iota
|
||||||
insertionClosing
|
insertionClosing
|
||||||
|
@ -16,6 +17,7 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
type MarkupModeType int
|
type MarkupModeType int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MarkupModeXEP0393 MarkupModeType = iota
|
MarkupModeXEP0393 MarkupModeType = iota
|
||||||
MarkupModeMarkdown
|
MarkupModeMarkdown
|
||||||
|
@ -216,7 +218,7 @@ func quotePrependNewlines(entity *client.TextEntity, doubledRunes []rune, markup
|
||||||
isNewline := doubledRunes[i] == newlineCode
|
isNewline := doubledRunes[i] == newlineCode
|
||||||
if (isNewline && markupMode == MarkupModeXEP0393) || (wasNewline && isNewline && markupMode == MarkupModeMarkdown) {
|
if (isNewline && markupMode == MarkupModeXEP0393) || (wasNewline && isNewline && markupMode == MarkupModeMarkdown) {
|
||||||
insertions = append(insertions, &insertion{
|
insertions = append(insertions, &insertion{
|
||||||
Offset: i+1,
|
Offset: i + 1,
|
||||||
Runes: quoteRunes,
|
Runes: quoteRunes,
|
||||||
Type: insertionUnpaired,
|
Type: insertionUnpaired,
|
||||||
})
|
})
|
||||||
|
@ -388,7 +390,7 @@ func Format(
|
||||||
if ins1.Offset == ins2.Offset {
|
if ins1.Offset == ins2.Offset {
|
||||||
if ins2.Type == insertionOpening { // > **
|
if ins2.Type == insertionOpening { // > **
|
||||||
return true
|
return true
|
||||||
} else if ins2.Type == insertionClosing { // **>
|
} else if ins2.Type == insertionClosing { // **>
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -399,7 +401,7 @@ func Format(
|
||||||
if ins1.Offset == ins2.Offset {
|
if ins1.Offset == ins2.Offset {
|
||||||
if ins1.Type == insertionOpening { // > **
|
if ins1.Type == insertionOpening { // > **
|
||||||
return false
|
return false
|
||||||
} else if ins1.Type == insertionClosing { // **>
|
} else if ins1.Type == insertionClosing { // **>
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -532,7 +532,7 @@ func TestMessageToPrefix6(t *testing.T) {
|
||||||
message := client.Message{
|
message := client.Message{
|
||||||
Id: 23,
|
Id: 23,
|
||||||
IsOutgoing: true,
|
IsOutgoing: true,
|
||||||
ReplyTo: &client.MessageReplyToMessage{
|
ReplyTo: &client.MessageReplyToMessage{
|
||||||
MessageId: 42,
|
MessageId: 42,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue