简体   繁体   中英

Is there a syntax for links with no text in Markdown?

I want to write

http://www.foo.com/ 

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

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

Is it possible?

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> 

我觉得这很适合我的IDE,将链接包装在<a>标签中:

<a>http://example.com/</a>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM