pkgdown icon indicating copy to clipboard operation
pkgdown copied to clipboard

Add robustness to repo source not having a slash

Open maelle opened this issue 4 years ago • 1 comments

In https://github.com/r-lib/pkgdown/blob/6a412e3a9d2d12d43e6b24eb25b97633ec350cda/R/repo.R#L25 if one has e.g.

repo:
  url:
    home: https://gitlab.com/chuxinyuan/ecce
    source: https://gitlab.com/chuxinyuan/ecce/-/tree/master

without "/" the links to code source are wrong as they are, well, missing a slash.

Sort of related to #2015

maelle avatar Jan 17 '22 15:01 maelle

Sorry, I was unable to access github for a long time. This issue seems to have received little attention. If necessary, I would like to cooperate with you to complete the development and testing work.

chuxinyuan avatar Oct 16 '23 03:10 chuxinyuan

Since we already have a fs dependency, I think we can just switch to fs::path() here.

hadley avatar Apr 19 '24 20:04 hadley

Ah that doesn't work because it strips the double // from http://

hadley avatar Apr 22 '24 14:04 hadley