We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ebb2556 commit cbafdc2Copy full SHA for cbafdc2
1 file changed
telegram/message.py
@@ -673,6 +673,8 @@ def text_html(self):
673
674
if entity.type == MessageEntity.TEXT_LINK:
675
insert = '<a href="{}">{}</a>'.format(entity.url, text)
676
+ elif entity.type == MessageEntity.URL:
677
+ insert = '<a href="{0}">{0}</a>'.format(text)
678
elif entity.type == MessageEntity.BOLD:
679
insert = '<b>' + text + '</b>'
680
elif entity.type == MessageEntity.ITALIC:
@@ -723,6 +725,8 @@ def text_markdown(self):
723
725
724
726
727
insert = '[{}]({})'.format(text, entity.url)
728
729
+ insert = '[{0}]({0})'.format(text)
730
731
insert = '*' + text + '*'
732
0 commit comments