1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

fix in text sources list creating

This commit is contained in:
InsanusMokrassar 2021-05-05 19:02:22 +06:00
parent cabfd7c76b
commit 59d7a7c781
2 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,9 @@
## 0.34.1
* `Core`
* Fix in creating of text sources list
## 0.34.0
**UPDATE UP TO Telegram Bot API 5.2**

View File

@ -59,7 +59,7 @@ internal fun List<TextSource>.fillWithRegulars(source: String): List<TextSource>
val textSource = get(i)
val thisSourceInStart = source.startsWith(textSource.source, index)
if (!thisSourceInStart) {
val regularEndIndex = source.indexOf(textSource.source)
val regularEndIndex = source.indexOf(textSource.source, index)
result.add(regular(source.substring(index, regularEndIndex)))
index = regularEndIndex
}