[英]Link conventions
有多種方法可以聲明帶標題或不帶標題的鏈接。 我想知道是否有一種首選的方式來做這件事,無論是官方的還是在社區中廣泛使用的。
取自markdownguide.org/basic-syntax/#formatting-the-second-part-of-the-link ,這里是聲明引用樣式鏈接的所有方法(這也適用於內聯樣式鏈接,只有a (
而不是:
和 a )
在最后):
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle "Hobbit lifestyles"
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle 'Hobbit lifestyles'
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle (Hobbit lifestyles)
[1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> "Hobbit lifestyles"
[1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> 'Hobbit lifestyles'
[1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> (Hobbit lifestyles)
我假設[1]:
之后的空格應該被包括在內,考慮到他們沒有顯示這個選項。 那是對的嗎?
我在daringfireball.net/projects/markdown查看了 John Gruber 的官方文檔,看起來他們更喜歡[name]: link "title"
。
如果沒有“首選”方式,您會使用哪種方式,為什么? 它們中的任何一個在功能上有任何不同嗎?
[1]:
之后的空格應該包括在內,它甚至在格式化鏈接的第二部分中這樣說:“括號中的 label,緊接着是一個冒號和至少一個空格”
我喜歡的風格是[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle "Hobbit lifestyles"
。 我盡量避免使用單引號和括號。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.