Strip well-known version component origin/ from remote version #3377
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3203
As far as I can tell all "Edit on Github" buttons have broken URLs when they refer to branch names.
Examples:
http://django-wiki.readthedocs.io/en/master/
http://discretize.simpeg.xyz/en/master/
Somehow, if it's just a default
latest
slug pointing to the master branch, then there's no appending oforigin/
. There's some stuff going on invcs_support.backends.git
that I can't really say might have a cause of that... and that perhaps the fix should be placed there. Anyways, the generation of a URL is view logic, so I kind of prefer my simple fix, putting the logic where the link is generated.https://github.com/rtfd/readthedocs.org/blob/master/readthedocs/vcs_support/backends/git.py#L127
Example of non-affected page:
http://django-statsd.readthedocs.io/en/latest/