Markdown-like formatting is applied to monospace text
This is not a very useful behaviour because I think that monospace text is expected to be left as is (and this is behavior of telegram desktop, for example)
I most frequently encounter this bug when I talk about magic methods in Python. Considering that they start with double undescore and end with double underscore, it's impossible to write them literally in a text message
Other much less likely hits are double pointer dereferencing in, for example, C (*) and double ~ operator
I've been bitten by this multiple times when talking about Python and it's really annoying
I think that Markdown-like formatting should not be applied to monospace text
Steps to reproduce
Go to any chat
Create a message with following contents:
__init__
Send that message
Witness that underscores are not present in monospace text
Device info
Telegram Android 10.1.3 (39449), Google Pixel 6a, SDK 34
v8.4 introduced the new spoiler formatting and at same time changed the formatting logic.
A temporary solution you can do is to use inline bots to send your code, such as @printfbot. Just write @printfbot `__this__` and tap the first result to send it. It will not be possible to edit the message later, but you can schedule the message if you want to look at it before sending, to make sure it has no errors.
In my experience, the most reliable telegram app for working with long complex formatted messages is desktop.telegram.org
N
N 🍿
You can also write @printfbot ```__this__``` using the formatting menu, or the bacticks at (`) single or triple
Log in here to report bugs or suggest features. Please enter your phone number in the international format and we will send a confirmation message to your account via Telegram.
It was reported here Do not interpret markdown inside code block #15185
v8.4 introduced the new spoiler formatting and at same time changed the formatting logic.
A temporary solution you can do is to use inline bots to send your code, such as @printfbot.
Just write @printfbot `__this__` and tap the first result to send it.
It will not be possible to edit the message later, but you can schedule the message if you want to look at it before sending, to make sure it has no errors.
In my experience, the most reliable telegram app for working with long complex formatted messages is desktop.telegram.org