File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -673,6 +673,8 @@ def text_html(self):
673
673
674
674
if entity .type == MessageEntity .TEXT_LINK :
675
675
insert = '<a href="{}">{}</a>' .format (entity .url , text )
676
+ elif entity .type == MessageEntity .URL :
677
+ insert = '<a href="{0}">{0}</a>' .format (text )
676
678
elif entity .type == MessageEntity .BOLD :
677
679
insert = '<b>' + text + '</b>'
678
680
elif entity .type == MessageEntity .ITALIC :
@@ -723,6 +725,8 @@ def text_markdown(self):
723
725
724
726
if entity .type == MessageEntity .TEXT_LINK :
725
727
insert = '[{}]({})' .format (text , entity .url )
728
+ elif entity .type == MessageEntity .URL :
729
+ insert = '[{0}]({0})' .format (text )
726
730
elif entity .type == MessageEntity .BOLD :
727
731
insert = '*' + text + '*'
728
732
elif entity .type == MessageEntity .ITALIC :
You can’t perform that action at this time.
0 commit comments