As of Telegram's Bot API version 4.5, the API supports a new text format, MarkdownV2. This is an enhanced version of the previous Markdown support.
The "specification" for MarkdownV2 says:
- Inside
(...)part of inline link definition, all ')' and '\' must be escaped with a preceding '\' character.- In all other places characters '_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!' must be escaped with the preceding character '\'.
Why does the dot . character need to be escaped? As far as I can see, it isn't used in any formatting syntax. The syntax examples that Telegram provides certainly doesn't use . in that way:
To use this mode, pass MarkdownV2 in the parse_mode field. Use the following syntax in your message:
*bold \*text* _italic \*text_ __underline__ ~strikethrough~ *bold _italic bold ~italic bold strikethrough~ __underline italic bold___ bold* [inline URL](http://www.example.com/) [inline mention of a user](tg://user?id=123456789) `inline fixed-width code` ``` pre-formatted fixed-width code block ``` ```python pre-formatted fixed-width code block written in the Python programming language ```
I don't know about Telegram specifically, but Markdown uses . as part of ordered lists, e.g.:
1. One
1. Two
1. Three
which renders as:
Note that in the original spec the number used doesn't matter; Markdown renumbers for you.
In contrast,
1\. One
1\. Two
1\. Three
renders as
1. One 1. Two 1. Three
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With