我想要写作
http://www.foo.com/
并获取一个链接,其中URL作为文本显示(例如,在HTML输出中)。我不想写
[http://www.foo.com/](http://www.foo.com/)
可以吗?
是的,这里是相关文档的部分内容:
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>
http://www.foo.com/
=> http://www.foo.com/ ,在评论中链接的文本会被缩短。而 <http://www.foo.com/>
=> http://www.foo.com/。 - Aprillion./d/a.txt
,<d/a.txt>
将不会链接到该文件。 - undefined如果您的Markdown被解析为Github Flavored Markdown,那么这已经是GFM扩展语法的一部分,称为“自动链接引用”。请参阅GFM文档以获取更多详细信息。
./d/a.txt
,<d/a.txt>
将不会链接到该文件。 - undefined我发现这个方法可以很好地在我的IDE中工作,将链接包装在<a>
标签中:
<a>http://example.com/</a>
http://example.com/
?还是它创建了一个无效的链接?或者可能链接到当前页面? - Chris