mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-06-03 00:15:27 +00:00
15 lines
479 B
Kotlin
15 lines
479 B
Kotlin
package com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity
|
|
|
|
abstract class TextMessageEntity : MessageEntity {
|
|
protected abstract val markdownFormatSymbol: String
|
|
protected abstract val htmlFormatTagname: String
|
|
|
|
override val asMarkdownSource: String by lazy {
|
|
"$markdownFormatSymbol$sourceString$markdownFormatSymbol"
|
|
}
|
|
|
|
override val asHtmlSource: String by lazy {
|
|
"<$htmlFormatTagname>$sourceString</$htmlFormatTagname>"
|
|
}
|
|
}
|