Closed yelboudouri closed 4 months ago
what about underline?
Markdown doesn't support underline text.
I think we need to add a setting constant to specify whether to strictly follow the Markdown specification, because sometimes, such as when used by bots, it will be troublesome not to be able to make a Telegram supported underline. I hope to be able to do both.
But this library should follow the markdown specification by default. I will improve the follow-up work and release a new version.
Thank you for your contribution
This is a message rendered by the old code.
You see, it says 'bold text' but it's underlined. I think it should be kept this way because if a bot wants to render an underline, they have to include it directly in their message. This library is made to convert Markdown to MarkdownV2. I have a small idea: to make use of underline in other contexts, for example in headings.
I made a compatibility improvement: https://github.com/sudoskys/telegramify-markdown/pull/7 I think it can solve this problem
Telegram bold text is defined by
*text*
, while Markdown bold text is defined by**text**
or__text__
[ref]. Therefore, both**text**
and__text__
should be converted to*text*
.