diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/CaptionAndTextSourcesToText.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/CaptionAndTextSourcesToText.kt index c83bbe1500..e30280f453 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/CaptionAndTextSourcesToText.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/CaptionAndTextSourcesToText.kt @@ -54,7 +54,7 @@ fun createMarkdownText( fun FullTextSourcesList.toMarkdownCaptions(): List = createMarkdownText( this, - captionLength.last + 1 + captionLength.last ) fun CaptionedInput.toMarkdownCaptions(): List = fullEntitiesList().toMarkdownCaptions() @@ -66,7 +66,7 @@ fun TextContent.toMarkdownTexts(): List = fullEntitiesList().toMarkdownT fun FullTextSourcesList.toMarkdownExplanations(): List = createMarkdownText( this, - explanationLimit.last + 1 + explanationLimit.last ) fun ExplainedInput.toMarkdownExplanations(): List = fullEntitiesList().toMarkdownTexts() @@ -78,7 +78,7 @@ fun createMarkdownV2Text( fun FullTextSourcesList.toMarkdownV2Captions(): List = createMarkdownV2Text( this, - captionLength.last + 1 + captionLength.last ) fun CaptionedInput.toMarkdownV2Captions(): List = fullEntitiesList().toMarkdownV2Captions() @@ -90,19 +90,19 @@ fun TextContent.toMarkdownV2Texts(): List = fullEntitiesList().toMarkdow fun FullTextSourcesList.toMarkdownV2Explanations(): List = createMarkdownV2Text( this, - explanationLimit.last + 1 + explanationLimit.last ) fun ExplainedInput.toMarkdownV2Explanations(): List = fullEntitiesList().toMarkdownV2Texts() fun createHtmlText( entities: FullTextSourcesList, - partLength: Int = 4096 + partLength: Int = textLength.last ): List = createFormattedText(entities, partLength, HTMLParseMode) fun FullTextSourcesList.toHtmlCaptions(): List = createHtmlText( this, - captionLength.last + 1 + captionLength.last ) fun CaptionedInput.toHtmlCaptions(): List = fullEntitiesList().toHtmlCaptions() @@ -114,7 +114,7 @@ fun TextContent.toHtmlTexts(): List = fullEntitiesList().toHtmlTexts() fun FullTextSourcesList.toHtmlExplanations(): List = createHtmlText( this, - explanationLimit.last + 1 + explanationLimit.last ) fun ExplainedInput.toHtmlExplanations(): List = fullEntitiesList().toHtmlTexts()