Is there a syntax for links with no text in Markdo

2020-08-09 05:37发布

I want to write

http://www.foo.com/ 

and get a link with the URL as the text (e.g., in HTML output). I do not want to write

[http://www.foo.com/](http://www.foo.com/)

Is it possible?

2条回答
女痞
2楼-- · 2020-08-09 06:15

I find this works with my IDE nicely, wrapping the link in an <a> tag:

<a>http://example.com/</a>
查看更多
Melony?
3楼-- · 2020-08-09 06:29

Yes, here is the relevant section of the documentation:

AUTOMATIC LINKS

Markdown supports a shortcut style for creating “automatic” links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:

<http://example.com/>

Markdown will turn this into:

<a href="http://example.com/">http://example.com/</a>
查看更多
登录 后发表回答