1 year ago
#279673
Ari157
Python markdown automatically link URLs
I want to automatically link URLs if typed in text, I am unable to find an extension for it and not really sure how I'd do it myself,
For example this is NOT what I want, but it's the default behaviour
>>> import markdown
>>> markdown.markdown("https://google.com/")
'<p>https://google.com/</p>'
But I want it to be
>>> import markdown
>>> markdown.markdown("https://google.com/")
'<a href="https://google.com/">https://google.com/</a>'
Any extension to do that or should I go for regex or....
Thanks for the answers in advance
python
python-3.x
url
markdown
markup
0 Answers
Your Answer