diff --git a/app/utils/markdown.py b/app/utils/markdown.py index 4fe2c27..6cde88b 100644 --- a/app/utils/markdown.py +++ b/app/utils/markdown.py @@ -8,7 +8,11 @@ class TelegramMarkdownConverter(MarkdownConverter): def convert_img(self, el, text, convert_as_inline): src = el.attrs.get('src', None) or '' - return f'Image: [{src}]({src})' + + if convert_as_inline: + return f'(Image: [{src}]({src}))' + + return f'\nImage: [{src}]({src})\n' def convert_br(self, el, text, convert_as_inline): if convert_as_inline: