2014-09-12 52 views
1

子彈點列表目前我使用的是項目的README.md文件中這一降價文本在GitHub上:包括參考鏈接作爲在GitHub上

See the docs of [testthat][3] on how to write unit tests. 

Links 
----- 

- http://www.rstudio.com/products/rpackages/devtools/ 
- https://github.com/hadley/testthat 
- http://r-pkgs.had.co.nz/tests.html 

--- 

[1]: http://www.rstudio.com/products/rpackages/devtools/ 
[2]: https://github.com/hadley/testthat 
[3]: http://r-pkgs.had.co.nz/tests.html 

我不喜歡這樣的重複,但我沒有看到我有什麼選擇。如果我刪除了明確的項目符號列表,那麼GitHub將不會顯示參考鏈接。如果我刪除引用鏈接,那麼GitHub會顯示項目符號列表(當然),但上面的「testthat」等嵌入式鏈接不起作用。

有沒有比複製更好的方法?我錯過了什麼?

回答

2

我寫如下:

See the docs of [testthat][1] on how to write unit tests. 

Links 
----- 

- [RStudio Devtools](http://www.rstudio.com/products/rpackages/devtools/) 
- [Testthat](https://github.com/hadley/testthat) 
- [Tests][1] 

[1]: http://r-pkgs.had.co.nz/tests.html 

這是否回答你的問題?如果沒有,你必須澄清它。

4

通過@mb21啓發,我想這將是正確的方式做到這一點:

See the docs of [testthat][2] on how to write unit tests. 

Links 
----- 

- [RStudio Devtools][1] 
- [testthat][2] 
- [More unit test examples][3] 

[1]: https://stackoverflow.com/users/214446/mb21 
[2]: https://github.com/hadley/testthat 
[3]: http://r-pkgs.had.co.nz/tests.html 

也就是說,這不是一個很好的做法,包括鏈接逐字和沒有一個有意義的標題。我應該只將鏈接URL保留在底部的參考鏈接部分,並且在項目符號列表中使用有意義的標題。

當你在GitHub上查看時,URL並不重要,如果你真的想知道你可以移動鼠標。當您以純文本查看此內容時,現在鏈接具有有意義的標題,這是有用的有關URL的附加信息。