-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong readme link resolution for relative paths with workspace readme #9927
Comments
this is basically the same issue as #9886. since |
Oh I see. Thanks for the clarification. This is unfortunate, maybe cargo should rewrite to EDIT: Ah I see, cargo first copies the README.md into the root of the crate (alongside the Cargo.toml of the crate) before rewriting the path. |
Due to how cargo packages crates from a workspace, the relative paths used in the readme do not work when visiting crates.io (see rust-lang/crates.io#9927). This is easily fixed by using absolute URLs into the link.
Due to how cargo packages crates from a workspace, the relative paths used in the readme do not work when visiting crates.io (see rust-lang/crates.io#9927). This is easily fixed by using absolute URLs into the link.
Current Behavior
Consider a repository at
https://github.com/foo/bar.git
.The
README.md
file at the root contains the following:The root
Cargo.toml
contains:The
crates/mycrate/Cargo.toml
:In that case, the README on crates.io will resolve the link to
https://github.com/foo/bar/blob/HEAD/crates/mycrate/thisfile.md
.Expected Behavior
The link in the README on crates.io should resolve to
https://github.com/foo/bar/blob/HEAD/thisfile.md
.Steps To Reproduce
See setup in the "Current Behavior" section.
Environment
Anything else?
The same problem appears with relative images.
The text was updated successfully, but these errors were encountered: