This commit is contained in:
Bohdan Horbeshko 2023-11-16 08:06:21 -05:00
parent dcb802358b
commit 705cfc1d49
2 changed files with 6 additions and 4 deletions

View file

@ -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,
}) })