From 4ccfb93a94c48c883f55bd13e681dfba61175eee Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 31 Mar 2019 10:20:14 +0800 Subject: [PATCH] Markdown and HTML typealiases --- CHANGELOG.md | 1 + .../TelegramBotAPI/types/ParseMode/ParseMode.kt | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0e1a36261..d8fcda1579 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ media for present out) * 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 of `]` in links titles +* Added `Markdown` and `HTML` type aliases which actually means `MarkdownParseMode` and `HTMLParseMode` ## 0.11.0 diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ParseMode/ParseMode.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ParseMode/ParseMode.kt index 94a1357a41..98a1d1b1b4 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ParseMode/ParseMode.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ParseMode/ParseMode.kt @@ -23,6 +23,9 @@ object HTMLParseMode : ParseMode() { override val parseModeName: String = "HTML" } +typealias Markdown = MarkdownParseMode +typealias HTML = HTMLParseMode + @Serializer(ParseMode::class) internal class ParseModeSerializerObject: KSerializer { override fun deserialize(decoder: Decoder): ParseMode {