1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-25 19:48:43 +00:00

Markdown and HTML typealiases

This commit is contained in:
InsanusMokrassar 2019-03-31 10:20:14 +08:00
parent 997f9ce411
commit 4ccfb93a94
2 changed files with 4 additions and 0 deletions

View File

@ -57,6 +57,7 @@ media for present out)
* Add tools for work with html captions and texts * Add tools for work with html captions and texts
* `MessageContent` which using captions or text now have default parse mode `HTMLParseMode` due to issue with escaping * `MessageContent` which using captions or text now have default parse mode `HTMLParseMode` due to issue with escaping
of `]` in links titles of `]` in links titles
* Added `Markdown` and `HTML` type aliases which actually means `MarkdownParseMode` and `HTMLParseMode`
## 0.11.0 ## 0.11.0

View File

@ -23,6 +23,9 @@ object HTMLParseMode : ParseMode() {
override val parseModeName: String = "HTML" override val parseModeName: String = "HTML"
} }
typealias Markdown = MarkdownParseMode
typealias HTML = HTMLParseMode
@Serializer(ParseMode::class) @Serializer(ParseMode::class)
internal class ParseModeSerializerObject: KSerializer<ParseMode> { internal class ParseModeSerializerObject: KSerializer<ParseMode> {
override fun deserialize(decoder: Decoder): ParseMode { override fun deserialize(decoder: Decoder): ParseMode {