You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Operating System: Any
Python Version: 3.8+
aiogram version: latest
aiohttp version: latest
uvloop version (if installed): irrelevant
Expected Behavior
from aiogram.utils import markdown as md
if parse_mode == 'MarkdownV2':
result = md.pre(md.escape_md(text))
else:
result = md.hpre(md.quote_html(text))
Current Behavior
from aiogram.utils import markdown as md
if parse_mode == 'MarkdownV2':
result = md.pre(f"\n{md.escape_md(text)}\n")
else:
result = md.hpre(md.quote_html(text))
Failure Information (for bugs)
MarkdownDecoration.pre() and HtmlDecoration.pre() have different behavior.
Markdown(V2) format style when inserted text without '\n' the first line will be defined as code language class and never be displayed in messages.
Besides, symbols '\n' at begin and end of insertioned text are present in the official documentation.
Steps to Reproduce
See Current Behavior code
The text was updated successfully, but these errors were encountered:
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Expected Behavior
Current Behavior
Failure Information (for bugs)
MarkdownDecoration.pre()
andHtmlDecoration.pre()
have different behavior.Markdown(V2) format style when inserted text without
'\n'
the first line will be defined as code language class and never be displayed in messages.Besides, symbols
'\n'
at begin and end of insertioned text are present in the official documentation.Steps to Reproduce
See Current Behavior code
The text was updated successfully, but these errors were encountered: